package org.oimwrapper.connectors;

import Thor.API.*;
import Thor.API.Base.*;
import Thor.API.Exceptions.*;
import Thor.API.Security.*;
import com.thortech.util.logging.*;
import com.thortech.xl.dataaccess.*;
import com.thortech.xl.scheduler.tasks.*;
import com.thortech.xl.vo.ResourceData;
import java.io.*;
import java.sql.*;
import java.util.*;

import org.oimwrapper.connectors.adapters.*;
import org.oimwrapper.connectors.exceptions.*;
import org.oimwrapper.connectors.internal.*;

/**
 * This is the basis for all scheduled tasks.
 */
public abstract class OIMTaskBase extends SchedulerBaseTask {

	/**
	 * A map of utility instances that's used to ensure single instantiation of those utilities.
	 */
	private Map utilityInstances;

	/**
	 * A map of attribute/value pairs associated with this task.
	 */
	private Map taskAttributes;

	/**
	 * The utility factory reference for this adapter.
	 */
	private tcUtilityFactory factory;
	
	/**
	 * The database reference for this adapter.
	 */
	private tcDataProvider database;

	/**
	 * The lookupUtilities object used by this instance.
	 */
	private OIMLookupUtilities lookupUtils;

	/**
	 * The itResourceUtilities object used by this instance.
	 */
	private OIMITResourceUtilities itResUtils;

	/**
	 * The orgUtilities object used by this instance.
	 */
	private OIMOrgUtilities orgUtils;

	/**
	 * The standardUtilities object used by this instance.
	 */
	private OIMStandardUtilities standardUtils;

	/**
	 * The userUtilities object used by this instance.
	 */
	private OIMUserUtilities userUtils;

	/**
	 * The groupUtilities object used by this instance.
	 */
	private OIMGroupUtilities groupUtils;

	/**
	 * The formUtilities object used by this instance.
	 */
	private OIMFormUtilities formUtils;

	/**
	 * The resourceObjectUtilities object used by this instance.
	 */
	private OIMResourceObjectUtilities resObjectUtils;

	/**
	 * The emailUtilities object used by this instance.
	 */
	private OIMEmailUtilities emailUtils;

	/**
	 * The accessPolicyUtilities object used by this instance.
	 */
	private OIMAccessPolicyUtilities policyUtils;

	/**
	 * The databaseUtilities object used by this instance.
	 */
	private OIMDatabaseUtilities databaseUtils;
	
	/**
	 * The requestUtilities object used by this instance.
	 */
	private OIMRequestUtilities requestUtils;

	/**
	 * The parent task from which this instance was created.
	 */
	private OIMTaskBase parent;
	
	/**
	 * A collaction of the threads spawned from this task.
	 */
	private List threads;

	/**
	 * The name of the log category used by this instance.
	 */
	protected String logCategory;

	/**
	 * This method is called by the scheduler to stop a running task instance.
	 * 
	 * @return <code>true</code> is always returned.
	 */
	public abstract boolean stop();

	/**
	 * This method is called by the scheduler to execute the task instance.
	 * 
	 */
	public abstract void execute();

	/**
	 * The logger for this task.
	 */
	public Logger logger;

	/**
	 * The default constructor.
	 * 
	 * @param LogCategory The name of the category to log messages to.
	 */
	public OIMTaskBase(String LogCategory) {
		super();
		logCategory = LogCategory;
		logger = Logger.getLogger(LogCategory);
		try {
			if (logger.isDebugEnabled()) {
				String jarFile = OIMCodeVersion.getJarFile(OIMTaskBase.class);
				logger.debug("Using taskBase -- built on " + OIMCodeVersion.getJarBuildDate(jarFile) + ", r" + OIMCodeVersion.getJarSvnRevision(jarFile));
			}
		} catch (Exception e) { ; }
		factory = null;
		database = null;
		utilityInstances = new HashMap();
		taskAttributes = new HashMap();
		parent = null;
		threads = new ArrayList();
	}

	/**
	 * Sets this task instance to use a utility factory rather then using the facilities
	 * of a local task scheduler.
	 *
	 * @param Factory The remote factory instance for this task to use.
	 */
	public final void enableRemoting(tcUtilityFactory Factory) {
		logger.debug("Entering taskBase.enableRemoting()");
		factory = Factory;
		XLClientSecurityAssociation.setThreadLoginSession(factory.getLoginSession());
		logger.debug("Exiting taskBase.enableRemoting()");
	}

	/**
	 * Sets this task instance to use a parent for loading utility functions.
	 *
	 * @param Parent The parent class from which the utilities should be loaded from.
	 */
	public final void setParent(OIMTaskBase Parent) {
		logger.debug("Entering taskBase.setParent()");
		parent = Parent;
		setTaskAttributeMap(parent.getTaskAttributeMap());
		logger.debug("Exiting taskBase.setParent()");
	}
	
	/**
	 * This is main method that can be used to run a task from the command line.
	 *
	 * @param Args An array of commandline arguments to be used for execution.
	 */
	public static void main(String[] Args) {
		int result = -1;
		try {
			String className = Args[0];
			String[] remainingArgs = new String[Args.length - 1];
			for (int i = 0; i < remainingArgs.length; i++) {
				remainingArgs[i] = Args[i + 1];
			}
			OIMTaskBase task = (OIMTaskBase) Class.forName(className).newInstance();
			main(remainingArgs, task);
			result = 0;
		} catch (Exception e) {
			e.printStackTrace();
		}
		System.exit(result);
	}

	/**
	 * This is a framework for that can be used as a 'true' main method for creating a 
	 * standalone implementation of a scheduled task.
	 *
	 * @param Args An array of commandline arguments to be used for execution.
	 * @param Task An instance of a class that implements {@link OIMTaskBase}.
	 */
	public static void main(String[] Args, OIMTaskBase Task) {
		OIMRemoteClientBase client = null;
		int result = -1;
		try {
			client = new OIMRemoteClientBase(Task.logCategory);
			if (Args.length < 2) {
				System.out.println("Usage: java " + Task.getClass().getName() + " <ConnectionInfo.props> <Attributes.props>");
				System.out.println(" Both properties files should be in the standard java properties file format.");
				System.out.println(" ConnectionInfo.props can contain the following attribures: ");
				System.out.println("   Username     -- The username to connect to OIM with");
				System.out.println("   Password     -- The password to connect to OIM with");
				System.out.println("   Server       -- The remote OIM server to connect to");
				System.out.println("   NamingPort   -- The naming port used to connect to the remote server on");
				System.out.println("   OimDirectory -- The directory on the local machine that contains the OIM client");
				System.out.println("   ServerType   -- A numeric identifier indicating the type of server that OIM is running on");
				System.out.println("     Valid Server Types are: ");
				System.out.println("       " + Integer.toString(OIMRemoteClientBase.JBoss) + " => JBoss");
				System.out.println("       " + Integer.toString(OIMRemoteClientBase.WebLogic) + " => WebLogic");
				System.out.println("       " + Integer.toString(OIMRemoteClientBase.WebSphere) + " => WebSphere");
				System.out.println("       " + Integer.toString(OIMRemoteClientBase.OC4J) + " => OC4J");
			} else {
				BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
				Properties connectionProps = new Properties();
                                System.out.println("Loading Connection Properties:" + Args[0]);
				File propFile = new File(Args[0]);
				if (propFile.exists()) {
					connectionProps.load(new FileInputStream(propFile));
				}
                                else
                                {
                                    throw new RuntimeException("File not Found:" + Args[0]);
                                }
				String username = connectionProps.getProperty("Username");
				while (username == null || username.length() == 0) {
					System.out.print("OIM Username: ");
					username = reader.readLine();
				}
				String password = connectionProps.getProperty("Password");
				while (password == null || password.length() == 0) {
					System.out.print("OIM Password: ");
					password = reader.readLine();
				}
				String server = connectionProps.getProperty("Server");
				while (server == null || server.length() == 0) {
					System.out.print("OIM Server: ");
					server = reader.readLine();
				}
				int namingPort = 0;
				try {
					namingPort = Integer.parseInt(connectionProps.getProperty("NamingPort"));
				} catch (NumberFormatException e) { ; }
				while (namingPort == 0) {
					System.out.print("Naming Port: ");
					try {
						namingPort = Integer.parseInt(reader.readLine());
					} catch (NumberFormatException e) { ; }
				}
				String oimDirectory = connectionProps.getProperty("OimDirectory");
				while (oimDirectory == null || oimDirectory.length() == 0) {
					System.out.print("Client Directory: ");
					oimDirectory = reader.readLine();
				}
				int serverType = OIMRemoteClientBase.Unknown_Server;
				try {
					serverType = Integer.parseInt(connectionProps.getProperty("ServerType", Integer.toString(OIMRemoteClientBase.Unknown_Server)));
				} catch (NumberFormatException e) { ; }
				while (serverType == OIMRemoteClientBase.Unknown_Server) {
					System.out.print("Server Type: ");
					try {
						serverType = Integer.parseInt(reader.readLine());
					} catch (NumberFormatException e) { ; }
				}
				client.setConnectionInfo(username, password, server, namingPort, oimDirectory, serverType);
				Task.enableRemoting(client.getFactory());
				Properties attributeProps = new Properties();
				propFile = new File(Args[1]);
				if (propFile.exists()) {
					attributeProps.load(new FileInputStream(propFile));
				}
				Task.setTaskAttributeMap(attributeProps);
				Task.init();
				Task.execute();
				result = 0;
			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			if (client != null) {
				client.disconnect();
			}
		}
                if (Args.length >= 3)
                {
                    String sysexit = Args[2];
                    if (sysexit != null && sysexit.equalsIgnoreCase("bypass"))
                        return;
                }
		System.exit(result);
	}

	/**
	 * This method initializes the utility instances for this class.
	 *
	 */
	public final void init() {
		logger.debug("Entering taskBase.init()");
		try {
			if (parent != null) {
				database = parent.database;
			} else if (factory != null) {
				database = (tcDataProvider) factory.getLoginSession().runAs(new OIMDataProviderAction());
			} else {
				database = new tcDataBaseClient();
			}
			OIMUtilityGetter getter = new OIMUtilityGetter(this, database);
			databaseUtils = getter.getDatabaseUtils();
			standardUtils = getter.getStandardUtils();
			lookupUtils = getter.getLookupUtils();
			itResUtils = getter.getItResUtils();
			orgUtils = getter.getOrgUtils();
			userUtils = getter.getUserUtils();
			groupUtils = getter.getGroupUtils();
			formUtils = getter.getFormUtilities();
			resObjectUtils = getter.getResObjectUtils();
			emailUtils = getter.getEmailUtils();
			policyUtils = getter.getPolicyUtils();
			requestUtils = getter.getRequestUtils();
		} catch (Exception e) {
			OIMExceptionHandler.handleException(logger, e, getClass());
		}
		logger.debug("Exiting taskBase.init()");
	}
	
	/**
	 * Gets a string value of an attribute.
	 *
	 * @param Attribute The name of the task attribute to retrieve.
	 * @return The value of that attribute.
	 */
	public final String getAttribute(String Attribute) {
		return getAttribute(Attribute, false);
	}

	/**
	 * Gets a string value of an attribute.
	 *
	 * @param Attribute The name of the task attribute to retrieve.
	 * @param Critical <code>true</code> if an interactive user should be prompted for a value, 
	 *                 or <code>false</code> if the user does not need to be prompted.
	 * @return The value of that attribute.
	 */
	private final String getAttribute(String Attribute, boolean Critical) {
		String result = null;
		if (taskAttributes.get(Attribute) != null) {
			result = (String) taskAttributes.get(Attribute);
		} else {
			if (factory != null && Critical) {
				try {
					BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
					System.out.print("Enter a value for " + Attribute + " : ");
					result = reader.readLine();
				} catch (IOException e) { ; }
			} else {
				result = super.getAttribute(Attribute);
			}
			if (result != null) {
				taskAttributes.put(Attribute, result);
			}
		}
		return result;
	}
	
	/**
	 * Gets a string value of an attribute.
	 *
	 * @param Attribute The name of the task attribute to retrieve.
	 * @param Default The default value to use if the attribute is not present.
	 * @return The value of that attribute.
	 */
	public final String getDefaultAttribute(String Attribute, String Default) {
		String value = getAttribute(Attribute, false);
		String result = isEmpty(value) ? Default : value;
		return result;
	}

	/**
	 * Gets a string value of an attribute, and throws an exception if that attribute is not present.
	 *
	 * @param Attribute The name of the task attribute to retrieve.
	 * @return The value of that attribute.
	 * @exception OIMMissingAttributeException
	 */
	public final String getCriticalAttribute(String Attribute) throws OIMMissingAttributeException {
		String result = getAttribute(Attribute, true);
		if (result == null || result.length() == 0) {
			throw new OIMMissingAttributeException(Attribute);
		}
		return result;
	}

	/**
	 * Gets a boolean value based on a task attribute.
	 *
	 * @param Attribute The name of the task attribute to retrieve.
	 * @param Default A default value to return if the attribute is not present.
	 * @return The value of that attribute.
	 */
	public final boolean getBooleanAttribute(String Attribute, boolean Default) {
		String value = getAttribute(Attribute, false);
		boolean result = isEmpty(value) ? Default : value.equalsIgnoreCase("true");
		return result;
	}

	/**
	 * Gets a map containg attribute-value pairs for all the task attributes for this task.
	 *
	 * @return A map containg attribute-value pairs for all the task attributes.
	 */
	public final Properties getAttributeMap() {
		return getTaskAttributeMap();
	}

	/**
	 * Gets a map containg attribute-value pairs for all the task attributes for this task.
	 *
	 * @return A map containg attribute-value pairs for all the task attributes.
	 */
	public final Properties getTaskAttributeMap() {
		Properties result = new Properties();
		if (factory == null) {
			result = super.getAttributeMap();
		}
		for (Iterator iterator = taskAttributes.keySet().iterator(); iterator.hasNext(); ) {
			String name = (String) iterator.next();
			if (taskAttributes.get(name) instanceof String) {
				String value = (String) taskAttributes.get(name);
				result.setProperty(name, value);
			}
		}
		return result;
	}

	/**
	 * Sets a map containg attribute-value pairs for all the task attributes for this task.
	 * All existing values will be removed and replaced by the values specified.
	 *
	 * @param Values A map containg attribute-value pairs for all the task attributes.
	 */
	public final void setTaskAttributeMap(Properties Values) {
		if (factory == null) {
			super.setTaskAttributeMap(Values);
		}
		taskAttributes = Values;
	}

	/**
	 * Gets an instance of an utility class using this task's connection.
	 *
	 * @param UtilityClass The class of the utility to retrieve.
	 * @return An instance of the specified utility class, or null if the class is not found.
	 * @exception tcAPIException
	 */
	public final tcUtilityOperationsIntf getUtility(Class UtilityClass) throws tcAPIException {
		return getUtility(UtilityClass.getName());
	}

	/**
	 * Gets an instance of an utility class using this task's connection.
	 *
	 * @param ClassName The name of the utility class to retrieve.
	 * @return An instance of the specified utility class, or null if the class is not found.
	 * @exception tcAPIException
	 */
	public final synchronized tcUtilityOperationsIntf getUtility(String ClassName) throws tcAPIException {
		tcUtilityOperationsIntf result = null;
		if (utilityInstances.get(ClassName) != null) {
			result = (tcUtilityOperationsIntf) utilityInstances.get(ClassName);
		} else if (parent != null) {
			result = parent.getUtility(ClassName);
		} else if (factory != null) {
			result = factory.getUtility(ClassName);
			utilityInstances.put(ClassName, result);
		} else {
			result = super.getUtility(ClassName);
			utilityInstances.put(ClassName, result);
		}
		return result;
	}

	/**
	 * Gets a data provider object for use by all client tasks.
	 * 
	 * @return A data provider object.
	 */
	public final synchronized tcDataProvider getDataBase() {
		return database;
	}

	/**
	 * Removes non-printable characters for a Map of recon data.
	 *
	 * @param Data A Map containing attribute-value pairs to submit for reconciliation.
	 * @return A cleaned Map with all the control characters removed.
	 * @exception Exception
	 */
	public final Map cleanCharacters(Map Data) throws Exception {
		logger.debug("Entering taskBase.cleanCharacters()");
		Map result = new HashMap();
		for (Iterator iterator = Data.keySet().iterator(); iterator.hasNext(); ) {
			String key = (String) iterator.next();
			String value = ((String) Data.get(key));
    			if (value != null) {
				value = value.replaceAll("\\p{Cntrl}", "").trim();
			}
			result.put(key, value);
		}
		logger.debug("Exiting taskBase.cleanCharacters()");
		return result;
	}

	/**
	 * Tests if a given string value is an empty value.   This is designed to be used with 
	 * task attributes.
	 *
	 * @param Input The String to check.
	 * @return <code>true</code> if the value is empty, or <code>false</code> if the value is
	 *         not empty.
	 */
	public final boolean isEmpty(String Input) {
		boolean result = (Input == null || Input.length() == 0 || Input.equalsIgnoreCase("[NONE]"));
		return result;
	}
	
	/**
	 * Starts a new worker thread.
	 * 
	 * @param MaxThreads The maximum number of threads to run at once.
	 * @param Worker The worker thread to run.
	 * @exception Exception
	 */
	public final void startThread(int MaxThreads, OIMTaskThreadBase Worker) throws Exception {
		logger.debug("Entering taskBase.startThread()");
		if (MaxThreads <= 1) {
			Worker.runOimThread();
		} else {
			while (true) {
				synchronized (threads) {
					int count = threads.size();
					if (count < MaxThreads) {
						threads.add(Worker);
						break;
					}
					if (count > 1) {
						logger.debug("Waiting for " + Integer.toString(count) + " workers to finish before proceeding...");
					} else {
						logger.debug("Waiting for 1 worker to finish before proceeding...");
					}
					threads.wait();
				}
			}
			Worker.start();
			logger.debug("Started " + Worker.toString());
		}
		logger.debug("Exiting taskBase.startThread()");
	}
	
	/**
	 * Waits for all threads to complete.
	 * 
	 * @exception Exception
	 */
	public void waitForAllThreads() throws Exception {
		logger.debug("Entering taskBase.waitForAllThreads()");
		while (true) {
			synchronized (threads) {
				int count = threads.size();
				if (count == 0) {
					break;
				}
				if (count > 1) {
					logger.debug("Waiting for " + Integer.toString(count) + " workers to finish before proceeding...");
				} else {
					logger.debug("Waiting for 1 worker to finish before proceeding...");
				}
				threads.wait();
			}
		}
		logger.debug("Exiting taskBase.waitForAllThreads()");
	}
	
	/**
	 * Notifies the task that a thread has complete.
	 * 
	 * @param Worker The completed thread.
	 */
	protected final void completeThread(OIMTaskThreadBase Worker) {
		logger.debug("Entering taskBase.completeThread()");
		synchronized (threads) {
			threads.remove(Worker);
			threads.notify();
		}
		logger.debug("Exiting taskBase.completeThread()");
	}

	/**
	 * Returns a Map containing the attribute names and values from a lookup.  An empty map is returned if the specified lookup
	 * is not found.
	 * 
	 * @param Lookup The name of the lookup to retrieve the values from.
	 * @return A map containing the attribute name value pairs from the specified lookup.
	 * @exception Exception
	 */
	public final Map getLookupValues(String Lookup) throws Exception {
		return isEmpty(Lookup) ? new HashMap() : lookupUtils.getLookupValues(Lookup);
	}

	/**
	 * Returns the decode value given a lookup and an encode value.   This method ignores case.
	 * 
	 * @param Lookup The name of the lookup to retrieve the value from.
	 * @param Key The name of encode value to retrieve.
	 * @return The corresponding decode value, or an empty string if the specified key or lookup is not found.
	 * @exception Exception
	 */
	public final String getLookupValue(String Key, String Lookup) throws Exception {
		return isEmpty(Lookup) ? "" : lookupUtils.getLookupValue(Key, Lookup);
	}
	
	/**
	 * Returns the decode values given a lookup and an decode value.   This method ignores case.
	 * 
	 * @param Lookup The name of the lookup to retrieve the value from.
	 * @param Value The name of decode value to retrieve.
	 * @return The corresponding decode value, or an empty string if the specified key or lookup is not found.
	 * @exception Exception
	 */
	public final String[] getLookupKeys(String Value, String Lookup) throws Exception {
		return  isEmpty(Lookup) ? new String[0] : lookupUtils.getLookupKeys(Value, Lookup);
	}

	/**
	 * Adds a new value to a lookup.
	 * 
	 * @param Lookup The name of the lookup to add the value to.
	 * @param Key The name of the key to add to the lookup.
	 * @param Value the value to add with that key.
	 * @exception Exception
	 */
	public final void addLookupValue(String Key, String Value, String Lookup) throws Exception {
		lookupUtils.addLookupValue(Key, Value, Lookup);
	}
	
	/**
	 * Updates a value within a lookup.
	 * 
	 * @param Key The name of the key to update in the lookup.
	 * @param Value The new value to set for that key.
	 * @param Lookup The name of the lookup to remove the value from.
	 * @exception Exception
	 */
	public final void updateLookupValue(String Key, String Value, String Lookup) throws Exception {
		lookupUtils.updateLookupValue(Key, Value, Lookup, false);
	}
	
	/**
	 * Updates a value within a lookup.
	 * 
	 * @param Key The name of the key to update in the lookup.
	 * @param Value The new value to set for that key.
	 * @param Lookup The name of the lookup to remove the value from.
	 * @param ExactMatch <code>true</code> if an exact case match should be used, or
	 *                   <code>false</code> if a case-insensitive match should be used.
	 * @exception Exception
	 */
	public final void updateLookupValue(String Key, String Value, String Lookup, boolean ExactMatch) throws Exception {
		lookupUtils.updateLookupValue(Key, Value, Lookup, ExactMatch);
	}

	/**
	 * Removes a value from a lookup.
	 * 
	 * @param Lookup The name of the lookup to add the value to.
	 * @param Key The name of the key to remove from the lookup.
	 * @exception Exception
	 */
	public final void removeLookupValue(String Key, String Lookup) throws Exception {
		lookupUtils.removeLookupValue(Key, Lookup, false);
	}
	
	/**
	 * Removes a value from a lookup.
	 * 
	 * @param Lookup The name of the lookup to add the value to.
	 * @param Key The name of the key to remove from the lookup.
	 * @param ExactMatch <code>true</code> if an exact case match should be used, or
	 *                   <code>false</code> if a case-insensitive match should be used.
	 * @exception Exception
	 */
	public final void removeLookupValue(String Key, String Lookup, boolean ExactMatch) throws Exception {
		lookupUtils.removeLookupValue(Key, Lookup, ExactMatch);
	}
	
	/**
	 * Creates a new lookup.
	 * 
	 * @param Lookup The name of the lookup to create.
	 * @exception Exception
	 */
	public final void createLookup(String Lookup) throws Exception {
		lookupUtils.createLookup(Lookup);
	}
	
	/**
	 * Removes all existing values from a lookup.
	 * 
	 * @param Lookup The name of the lookup to remove all existing values from.
	 * @exception Exception
	 */
	public final void clearLookup(String Lookup) throws Exception {
		lookupUtils.clearLookup(Lookup);
	}
	
	/**
	 * Removes an existing lookup, including any data within.
	 * 
	 * @param Lookup The name of the lookup to remove.
	 * @exception Exception
	 */
	public final void removeLookup(String Lookup) throws Exception {
		lookupUtils.removeLookup(Lookup);
	}

	/**
	 * Determines the instance key for an IT Resource.
	 *
	 * @param Name The name of the IT resource to get the instance key for.
	 * @return The instance key of the IT resource, or 0 if the IT resource is not found.
	 * @exception Exception
	 */
	public final long getItResource(String Name) throws Exception {
		return itResUtils.getItResource(Name);
	}
	
	/**
	 * Determines the name for an IT Resource.
	 *
	 * @param Key The key of the IT resource to get the name for.
	 * @return The name of the IT resource, or an empty string if the IT resource is not found.
	 * @exception Exception
	 */
	public final String getItResource(long Key) throws Exception {
		return itResUtils.getItResource(Key);
	}

	/**
	 * Determines the definition key for an IT Resource type.
	 *
	 * @param Type The name of the IT resource type to get the definition key for.
	 * @return The definition key of the IT resource, or 0 if the IT resource type is not found.
	 * @exception Exception
	 */
	public final long getItResourceDefinition(String Type) throws Exception {
		return itResUtils.getItResourceDefinition(Type);
	}

	/**
	 * This obtains a Map of IT resource parameters and values
	 * 
	 * @param Name The name of the IT resource to retrieve parameters for.
	 * @return A Map containg parameter names and values for that IT resource, or an
	 *         empty Map if the IT resource is not found.
	 * @exception Exception
	 */
	public final Map getITResData(String Name) throws Exception {
		return itResUtils.getITResData(itResUtils.getItResource(Name), false);
	}

	/**
	 * This obtains a Map of IT resource parameters and values
	 * 
	 * @param Name The name of the IT resource to retrieve parameters for.
	 * @param HideEncrypted <code>true</code> will mask out any encrypted values from the result set,
	 *                      and <code>false</code> will allow the encypted values to pass through.
	 * @return A Map containg parameter names and values for that IT resource, or an
	 *         empty Map if the IT resource is not found.
	 * @exception Exception
	 */
	public final Map getITResData(String Name, boolean HideEncrypted) throws Exception {
		return itResUtils.getITResData(itResUtils.getItResource(Name), HideEncrypted);
	}

	/**
	 * This obtains a Map of IT resource parameters and values
	 * 
	 * @param InstanceKey The isntance key of the IT resource to retrieve parameters for.
	 * @return A Map containg parameter names and values for that IT resource, or an
	 *         empty Map if the IT resource is not found.
	 * @exception Exception
	 */
	public final Map getITResData(long InstanceKey) throws Exception {
		return itResUtils.getITResData(InstanceKey, false);
	}

	/**
	 * This obtains a Map of IT resource parameters and values
	 * 
	 * @param InstanceKey The isntance key of the IT resource to retrieve parameters for.
	 * @param HideEncrypted <code>true</code> will mask out any encrypted values from the result set,
	 *                      and <code>false</code> will allow the encypted values to pass through.
	 * @return A Map containg parameter names and values for that IT resource, or an
	 *         empty Map if the IT resource is not found.
	 * @exception Exception
	 */
	public final Map getITResData(long InstanceKey, boolean HideEncrypted) throws Exception {
		return itResUtils.getITResData(InstanceKey, HideEncrypted);
	}

	/**
	 * Retrieves an array of Maps containing the data for all IT resources of a specified type.
	 *
	 * @param ITResourceType The type of the IT resource to retrieve all instances of.
	 * @return An array of Maps containg data for all IT resources of the specified type.
	 * @exception Exception
	 */
	public final Map[] getITResOfType(String ITResourceType) throws Exception {
		return itResUtils.getITResOfType(itResUtils.getItResourceDefinition(ITResourceType));
	}

	/**
	 * Retrieves an array of Maps containing the data for all IT resources of a specified type.
	 *
	 * @param ITResourceDefintionKey The key of the type of the IT resource to retrieve all instances of.
	 * @return An array of Maps containg data for all IT resources of the specified type.
	 * @exception Exception
	 */
	public final Map[] getITResOfType(long ITResourceDefintionKey) throws Exception {
		return itResUtils.getITResOfType(ITResourceDefintionKey);
	}

	/**
	 * Updates parameters on an existing IT resource instance.
	 *
	 * @param Name The IT Resource instance name of the IT resource to update.
	 * @param Data A map containg attribute-value pairs of the values to update.
	 * @exception Exception
	 */
	public final void updateITResource(String Name, Map Data) throws Exception {
		itResUtils.updateITResource(getItResource(Name), Data);
	}

	/**
	 * Updates parameters on an existing IT resource instance.
	 *
	 * @param ITResourceKey The IT Resource instance key of the IT resource to update.
	 * @param Data A map containg attribute-value pairs of the values to update.
	 * @exception Exception
	 */
	public final void updateITResource(long ITResourceKey, Map Data) throws Exception {
		itResUtils.updateITResource(ITResourceKey, Data);
	}

	/**
	 * Creates an IT resource instance.
	 *
	 * @param Name The name of the IT resource to create.
	 * @param Definition The IT resource type definition to use.
	 * @param Data A map containg attribute-value pairs of the values to set.
	 * @exception Exception
	 * @since Requires OIM 9.1
	 */
	public final void createITResource(String Name, String Definition, Map Data) throws Exception {
		itResUtils.createITResource(Name, itResUtils.getItResourceDefinition(Definition), Data);
	}

	/**
	 * Creates an IT resource instance.
	 *
	 * @param Name The name of the IT resource to create.
	 * @param DefinitionKey The key of the IT resource type definition to use.
	 * @param Data A map containg attribute-value pairs of the values to set.
	 * @exception Exception
	 * @since Requires OIM 9.1
	 */
	public final void createITResource(String Name, long DefinitionKey, Map Data) throws Exception {
		itResUtils.createITResource(Name, DefinitionKey, Data);
	}

	/**
	 * Remove an existing IT resource instance.
	 *
	 * @param Name The name of the IT Resource instance to remove.
	 * @exception Exception
	 * @since Requires OIM 9.1
	 */
	public final void removeITResource(String Name) throws Exception {
		itResUtils.removeITResource(itResUtils.getItResource(Name));
	}

	/**
	 * Remove an existing IT resource instance.
	 *
	 * @param ITResourceKey The IT Resource instance key of the IT resource to remove.
	 * @exception Exception
	 * @since Requires OIM 9.1
	 */
	public final void removeITResource(long ITResourceKey) throws Exception {
		itResUtils.removeITResource(ITResourceKey);
	}

	/**
	 * Gets the organization instance key for an organization.   
	 *
	 * @param Name The name of the organization to get the instance key for.
	 * @return The instance key of the organization, or 0 if the organization is not found.
	 * @exception Exception
	 */
	public final long getOrganization(String Name) throws Exception {
		return orgUtils.getOrganization(Name);
	}

	/**
	 * Gets the value of the specified field for an organization.
	 *
	 * @param Name The name of the organization to get the value for.
	 * @param Field The name of the field to retrieve a value for.
	 * @return The value of the field for the specified organzation, or an empty string if
	 *         the value is not found.
	 * @exception Exception
	 */
	public final String getOrganizationAttribute(String Name, String Field) throws Exception {
		return orgUtils.getOrganizationAttribute(getOrganization(Name), Field);
	}

	/**
	 * Gets the value of the specified field for an organization.
	 *
	 * @param OrgKey The key of the organization to get the value for.
	 * @param Field The name of the field to retrieve a value for.
	 * @return The value of the field for the specified organzation, or an empty string if
	 *         the value is not found.
	 * @exception Exception
	 */
	public final String getOrganizationAttribute(long OrgKey, String Field) throws Exception {
		return orgUtils.getOrganizationAttribute(OrgKey, Field);
	}

	/**
	 * Sets the value of the specified field for an organization.
	 *
	 * @param Name The name of the organization to set the value for.
	 * @param Field The name of the field to set a value for.
	 * @param Value The value to set for the field.
	 * @exception Exception
	 */
	public final void setOrganizationAttribute(String Name, String Field, String Value) throws Exception {
		orgUtils.setOrganizationAttribute(getOrganization(Name), Field, Value);
	}

	/**
	 * Sets the value of the specified field for an organization.
	 *
	 * @param OrgKey The key of the organization to set the value for.
	 * @param Field The name of the field to set a value for.
	 * @param Value The value to set for the field.
	 * @exception Exception
	 */
	public final void setOrganizationAttribute(long OrgKey, String Field, String Value) throws Exception {
		orgUtils.setOrganizationAttribute(OrgKey, Field, Value);
	}

	/**
	 * Gets an array of Maps containing data for all organizations on the system.
	 *
	 * @return A Array of Map's containing the attribute value pairs for the resulting object.
	 * @exception Exception
	 */
	public final Map[] getAllOrgs() throws Exception {
		return orgUtils.getAllOrgs();
	}

	/**
	 * Gets an array of Maps containing data for all root organizations on the system.
	 *
	 * @return An Array of Map's containing the attribute value pairs for the resulting object.
	 * @exception Exception
	 */
	public final Map[] getRootOrgs() throws Exception {
		return orgUtils.getRootOrgs();
	}

	/**
	 * Gets an array of Maps containing data for all child organizations of the specified parent.
	 *
	 * @param Org The name of the parent organization.
	 * @return An Array of Map's containing the attribute value pairs for the resulting object.
	 * @exception Exception
	 */
	public final Map[] getChildOrgs(String Org) throws Exception {
		return orgUtils.getChildOrgs(getOrganization(Org));
	}

	/**
	 * Gets an array of Maps containing data for all child organizations of the specified parent.
	 *
	 * @param OrgKey The key of the parent organization.
	 * @return An Array of Map's containing the attribute value pairs for the resulting object.
	 * @exception Exception
	 */
	public final Map[] getChildOrgs(long OrgKey) throws Exception {
		return orgUtils.getChildOrgs(OrgKey);
	}

	/**
	 * Creates a new organization.
	 *
	 * @param Name The name of the organization to create.
	 * @param Type The type of the organization to create.
	 * @exception Exception
	 */
	public final void createOrganization(String Name, String Type) throws Exception {
		orgUtils.createOrganization(Name, Type, 0L);
	}

	/**
	 * Creates a new organization with a parent.
	 *
	 * @param Name The name of the organization to create.
	 * @param Type The type of the organization to create.
	 * @param Parent The name of the parent organization.
	 * @exception Exception
	 */
	public final void createOrganization(String Name, String Type, String Parent) throws Exception {
		orgUtils.createOrganization(Name, Type, orgUtils.getOrganization(Parent));
	}

	/**
	 * Creates a new organization with a parent.
	 *
	 * @param Name The name of the organization to create.
	 * @param Type The type of the organization to create.
	 * @param ParentKey The name of the parent organization.
	 * @exception Exception
	 */
	public final void createOrganization(String Name, String Type, long ParentKey) throws Exception {
		orgUtils.createOrganization(Name, Type, ParentKey);
	}

	/**
	 * Grants a group admin access to an organization.
	 *
	 * @param Org The name of the organization to add the group as an admin to.
	 * @param Group The name of the group that is being delegated access to the organization.
	 * @param CanWrite <code>true</code> if the group should be allowed write access to the organization.
	 * @param CanDelete <code>true</code> if the group should be allowed to delete the organization.
	 * @exception Exception
	 */
	public final void addAdminGroupToOrganization(String Org, String Group, boolean CanWrite, boolean CanDelete) throws Exception {
		orgUtils.addAdminGroupToOrganization(getOrganization(Org), getOimGroup(Group), CanWrite, CanDelete);
	}

	/**
	 * Grants a group admin access to an organization.
	 *
	 * @param OrgKey The key of the organization to add the group as an admin to.
	 * @param Group The name of the group that is being delegated access to the organization.
	 * @param CanWrite <code>true</code> if the group should be allowed write access to the organization.
	 * @param CanDelete <code>true</code> if the group should be allowed to delete the organization.
	 * @exception Exception
	 */
	public final void addAdminGroupToOrganization(long OrgKey, String Group, boolean CanWrite, boolean CanDelete) throws Exception {
		orgUtils.addAdminGroupToOrganization(OrgKey, getOimGroup(Group), CanWrite, CanDelete);
	}

	/**
	 * Grants a group admin access to an organization.
	 *
	 * @param Org The name of the organization to add the group as an admin to.
	 * @param GroupKey The key of the group that is being delegated access to the organization.
	 * @param CanWrite <code>true</code> if the group should be allowed write access to the organization.
	 * @param CanDelete <code>true</code> if the group should be allowed to delete the organization.
	 * @exception Exception
	 */
	public final void addAdminGroupToOrganization(String Org, long GroupKey, boolean CanWrite, boolean CanDelete) throws Exception {
		orgUtils.addAdminGroupToOrganization(getOrganization(Org), GroupKey, CanWrite, CanDelete);
	}

	/**
	 * Grants a group admin access to an organization.
	 *
	 * @param OrgKey The key of the organization to add the group as an admin to.
	 * @param GroupKey The key of the group that is being delegated access to the organization.
	 * @param CanWrite <code>true</code> if the group should be allowed write access to the organization.
	 * @param CanDelete <code>true</code> if the group should be allowed to delete the organization.
	 * @exception Exception
	 */
	public final void addAdminGroupToOrganization(long OrgKey, long GroupKey, boolean CanWrite, boolean CanDelete) throws Exception {
		orgUtils.addAdminGroupToOrganization(OrgKey, GroupKey, CanWrite, CanDelete);
	}

	/**
	 * Removes admin access for a group from an organization.
	 *
	 * @param Org The name of the organization to remove the group as an admin from.
	 * @param Group The name of the group that is being delegated access to the organization.
	 * @exception Exception
	 */
	public final void removeAdminGroupFromOrganization(String Org, String Group) throws Exception {
		orgUtils.removeAdminGroupFromOrganization(getOrganization(Org), getOimGroup(Group));
	}

	/**
	 * Removes admin access for a group from an organization.
	 *
	 * @param OrgKey The key of the organization to remove the group as an admin from.
	 * @param Group The name of the group that is being delegated access to the organization.
	 * @exception Exception
	 */
	public final void removeAdminGroupFromOrganization(long OrgKey, String Group) throws Exception {
		orgUtils.removeAdminGroupFromOrganization(OrgKey, getOimGroup(Group));
	}

	/**
	 * Removes admin access for a group from an organization.
	 *
	 * @param Org The name of the organization to remove the group as an admin from.
	 * @param GroupKey The key of the group that is being delegated access to the organization.
	 * @exception Exception
	 */
	public final void removeAdminGroupFromOrganization(String Org, long GroupKey) throws Exception {
		orgUtils.removeAdminGroupFromOrganization(getOrganization(Org), GroupKey);
	}

	/**
	 * Removes admin access for a group from an organization.
	 *
	 * @param OrgKey The key of the organization to remove the group as an admin from.
	 * @param GroupKey The key of the group that is being delegated access to the organization.
	 * @exception Exception
	 */
	public final void removeAdminGroupFromOrganization(long OrgKey, long GroupKey) throws Exception {
		orgUtils.removeAdminGroupFromOrganization(OrgKey, GroupKey);
	}

	/**
	 * Fetches an Array of group keys for all groups that have been delegated access to 
	 * the organization.
	 *
	 * @param Org The name of the organization to get the list of administrators for.
	 * @return An Array of groups for each of the delegated administrators for the organization.
	 * @exception Exception
	 */
	public final long[] getAdminGroupsForOrganization(String Org) throws Exception {
		return orgUtils.getAdminGroupsForOrganization(getOrganization(Org));
	}

	/**
	 * Fetches an Array of group keys for all groups that have been delegated access to 
	 * the organization.
	 *
	 * @param OrgKey The key of the organization to get the list of administrators for.
	 * @return An Array of groups for each of the delegated administrators for the organization.
	 * @exception Exception
	 */
	public final long[] getAdminGroupsForOrganization(long OrgKey) throws Exception {
		return orgUtils.getAdminGroupsForOrganization(OrgKey);
	}

	/**
	 * Directly provisions an instance of an object to an organization.
	 *
	 * @param Org The name of the organization to provision the object to.
	 * @param ObjectName The name of the object type to provision to the organization.
	 * @return The process instance for the new instance.
	 * @exception Exception
	 */
	public final long provisionNewResourceToOrg(String Org, String ObjectName) throws Exception {
		return orgUtils.provisionNewResource(getOrganization(Org), getResourceObject(ObjectName));
	}

	/**
	 * Directly provisions an instance of an object to an organization.
	 *
	 * @param OrgKey The key of the organization to provision the object to.
	 * @param ObjectName The name of the object type to provision to the organization.
	 * @return The process instance for the new instance.
	 * @exception Exception
	 */
	public final long provisionNewResourceToOrg(long OrgKey, String ObjectName) throws Exception {
		return orgUtils.provisionNewResource(OrgKey, getResourceObject(ObjectName));
	}

	/**
	 * Directly provisions an instance of an object to an organization.
	 *
	 * @param Org The name of the organization to provision the object to.
	 * @param ObjectKey The key of the object type to provision to the organization.
	 * @return The process instance for the new instance.
	 * @exception Exception
	 */
	public final long provisionNewResourceToOrg(String Org, long ObjectKey) throws Exception {
		return orgUtils.provisionNewResource(getOrganization(Org), ObjectKey);
	}

	/**
	 * Directly provisions an instance of an object to an organization.
	 *
	 * @param OrgKey The key of the organization to provision the object to.
	 * @param ObjectKey The key of the object type to provision to the organization.
	 * @return The process instance for the new instance.
	 * @exception Exception
	 */
	public final long provisionNewResourceToOrg(long OrgKey, long ObjectKey) throws Exception {
		return orgUtils.provisionNewResource(OrgKey, ObjectKey);
	}

	/**
	 * Enables an instance of an object for an organization.
	 *
	 * @param Org The name of the organization to enable the object for.
	 * @param ProcessInstanceKey The key of the process instance to enable for the organization.
	 * @exception Exception
	 */
	public final void enableResourceForOrg(String Org, long ProcessInstanceKey) throws Exception {
		orgUtils.enableResource(getOrganization(Org), ProcessInstanceKey);
	}

	/**
	 * Enables an instance of an object for an organization.
	 *
	 * @param OrgKey The key of the organization to enable the object for.
	 * @param ProcessInstanceKey The key of the process instance to enable for the organization.
	 * @exception Exception
	 */
	public final void enableResourceForOrg(long OrgKey, long ProcessInstanceKey) throws Exception {
		orgUtils.enableResource(OrgKey, ProcessInstanceKey);
	}

	/**
	 * Disables an instance of an object to for an organization.
	 *
	 * @param Org The name of the organization to disable the object for.
	 * @param ProcessInstanceKey The key of the process instance to disable for the user.
	 * @exception Exception
	 */
	public final void disableResourceForOrg(String Org, long ProcessInstanceKey) throws Exception {
		orgUtils.disableResource(getOrganization(Org), ProcessInstanceKey);
	}

	/**
	 * Disables an instance of an object to for an organization.
	 *
	 * @param OrgKey The key of the organization to disable the object for.
	 * @param ProcessInstanceKey The key of the process instance to disable for the user.
	 * @exception Exception
	 */
	public final void disableResourceForOrg(long OrgKey, long ProcessInstanceKey) throws Exception {
		orgUtils.disableResource(OrgKey, ProcessInstanceKey);
	}

	/**
	 * Deletes/Revokes an instance of an object from an organization.
	 *
	 * @param Org The name of the organization to delete/revoke the object for.
	 * @param ProcessInstanceKey The key of the process instance to disable for the user.
	 * @exception Exception
	 */
	public final void deleteResourceForOrg(String Org, long ProcessInstanceKey) throws Exception {
		orgUtils.deleteResource(getOrganization(Org), ProcessInstanceKey);
	}

	/**
	 * Deletes/Revokes an instance of an object from an organization.
	 *
	 * @param OrgKey The key of the organization to delete/revoke the object for.
	 * @param ProcessInstanceKey The key of the process instance to disable for the user.
	 * @exception Exception
	 */
	public final void deleteResourceForOrg(long OrgKey, long ProcessInstanceKey) throws Exception {
		orgUtils.deleteResource(OrgKey, ProcessInstanceKey);
	}

	/**
	 * Gets an array of Maps containing data about the resources provisioned to an org.
	 *
	 * @param Org The name of the organization to get the resource list for.
	 * @return An array of Maps containing data about the resources provisioned.
	 * @exception Exception
	 */
	public final Map[] getProvisionedResourcesToOrg(String Org) throws Exception {
		return orgUtils.getResourceInstancesForOrg(getOrganization(Org), 0L, false);
	}

	/**
	 * Gets an array of Maps containing data about the resources provisioned to an org.
	 *
	 * @param OrgKey The key of the organization to get the resource list for.
	 * @return An array of Maps containing data about the resources provisioned.
	 * @exception Exception
	 */
	public final Map[] getProvisionedResourcesToOrg(long OrgKey) throws Exception {
		return orgUtils.getResourceInstancesForOrg(OrgKey, 0L, false);
	}
	
	/**
	 * Gets an array of Maps containing data about the resources provisioned to an org.
	 *
	 * @param Org The name of the organization to get the resource list for.
	 * @param ActiveOnly <code>true</code> if only Active resource instances should be retrieved, or
	 *                   <code>false</code> if all resources instances should be retrieved.
	 * @return An array of Maps containing data about the resources provisioned.
	 * @exception Exception
	 */
	public final Map[] getProvisionedResourcesToOrg(String Org, boolean ActiveOnly) throws Exception {
		return orgUtils.getResourceInstancesForOrg(getOrganization(Org), 0L, ActiveOnly);
	}

	/**
	 * Gets an array of Maps containing data about the resources provisioned to an org.
	 *
	 * @param OrgKey The key of the organization to get the resource list for.
	 * @param ActiveOnly <code>true</code> if only Active resource instances should be retrieved, or
	 *                   <code>false</code> if all resources instances should be retrieved.
	 * @return An array of Maps containing data about the resources provisioned.
	 * @exception Exception
	 */
	public final Map[] getProvisionedResourcesToOrg(long OrgKey, boolean ActiveOnly) throws Exception {
		return orgUtils.getResourceInstancesForOrg(OrgKey, 0L, ActiveOnly);
	}
	
	/**
	 * Gets an array of Maps containing data about the resources provisioned to an org.
	 *
	 * @param Org The name of the organization to get the resource list for.
	 * @param Object The name of the resource object type retrieve provisioned instances of.
	 * @return An array of Maps containing data about the resources provisioned.
	 * @exception Exception
	 */
	public final Map[] getProvisionedResourcesToOrg(String Org, String Object) throws Exception {
		return orgUtils.getResourceInstancesForOrg(getOrganization(Org), 0L, false);
	}

	/**
	 * Gets an array of Maps containing data about the resources provisioned to an org.
	 *
	 * @param OrgKey The key of the organization to get the resource list for.
	 * @param Object The name of the resource object type retrieve provisioned instances of.
	 * @return An array of Maps containing data about the resources provisioned.
	 * @exception Exception
	 */
	public final Map[] getProvisionedResourcesToOrg(long OrgKey, String Object) throws Exception {
		return orgUtils.getResourceInstancesForOrg(OrgKey, 0L, false);
	}
	
	/**
	 * Gets an array of Maps containing data about the resources provisioned to an org.
	 *
	 * @param Org The name of the organization to get the resource list for.
	 * @param ObjectKey The key of the resource object type retrieve provisioned instances of.
	 * @return An array of Maps containing data about the resources provisioned.
	 * @exception Exception
	 */
	public final Map[] getProvisionedResourcesToOrg(String Org, long ObjectKey) throws Exception {
		return orgUtils.getResourceInstancesForOrg(getOrganization(Org), 0L, false);
	}

	/**
	 * Gets an array of Maps containing data about the resources provisioned to an org.
	 *
	 * @param OrgKey The key of the organization to get the resource list for.
	 * @param ObjectKey The key of the resource object type retrieve provisioned instances of.
	 * @return An array of Maps containing data about the resources provisioned.
	 * @exception Exception
	 */
	public final Map[] getProvisionedResourcesToOrg(long OrgKey, long ObjectKey) throws Exception {
		return orgUtils.getResourceInstancesForOrg(OrgKey, 0L, false);
	}
	
	/**
	 * Gets an array of Maps containing data about the resources provisioned to an org.
	 *
	 * @param Org The name of the organization to get the resource list for.
	 * @param Object The name of the resource object type retrieve provisioned instances of.
	 * @param ActiveOnly <code>true</code> if only Active resource instances should be retrieved, or
	 *                   <code>false</code> if all resources instances should be retrieved.
	 * @return An array of Maps containing data about the resources provisioned.
	 * @exception Exception
	 */
	public final Map[] getProvisionedResourcesToOrg(String Org, String Object, boolean ActiveOnly) throws Exception {
		return orgUtils.getResourceInstancesForOrg(getOrganization(Org), 0L, ActiveOnly);
	}

	/**
	 * Gets an array of Maps containing data about the resources provisioned to an org.
	 *
	 * @param OrgKey The key of the organization to get the resource list for.
	 * @param Object The name of the resource object type retrieve provisioned instances of.
	 * @param ActiveOnly <code>true</code> if only Active resource instances should be retrieved, or
	 *                   <code>false</code> if all resources instances should be retrieved.
	 * @return An array of Maps containing data about the resources provisioned.
	 * @exception Exception
	 */
	public final Map[] getProvisionedResourcesToOrg(long OrgKey, String Object, boolean ActiveOnly) throws Exception {
		return orgUtils.getResourceInstancesForOrg(OrgKey, 0L, ActiveOnly);
	}
	
	/**
	 * Gets an array of Maps containing data about the resources provisioned to an org.
	 *
	 * @param Org The name of the organization to get the resource list for.
	 * @param ObjectKey The key of the resource object type retrieve provisioned instances of.
	 * @param ActiveOnly <code>true</code> if only Active resource instances should be retrieved, or
	 *                   <code>false</code> if all resources instances should be retrieved.
	 * @return An array of Maps containing data about the resources provisioned.
	 * @exception Exception
	 */
	public final Map[] getProvisionedResourcesToOrg(String Org, long ObjectKey, boolean ActiveOnly) throws Exception {
		return orgUtils.getResourceInstancesForOrg(getOrganization(Org), 0L, ActiveOnly);
	}

	/**
	 * Gets an array of Maps containing data about the resources provisioned to an org.
	 *
	 * @param OrgKey The key of the organization to get the resource list for.
	 * @param ObjectKey The key of the resource object type retrieve provisioned instances of.
	 * @param ActiveOnly <code>true</code> if only Active resource instances should be retrieved, or
	 *                   <code>false</code> if all resources instances should be retrieved.
	 * @return An array of Maps containing data about the resources provisioned.
	 * @exception Exception
	 */
	public final Map[] getProvisionedResourcesToOrg(long OrgKey, long ObjectKey, boolean ActiveOnly) throws Exception {
		return orgUtils.getResourceInstancesForOrg(OrgKey, 0L, ActiveOnly);
	}

	/**
	 * Disables an organization.
	 *
	 * @param Org The name of the organization to disable.
	 * @exception Exception
	 */
	public final void disableOrg(String Org) throws Exception {
		orgUtils.disableOrg(getOrganization(Org));
	}

	/**
	 * Disables an organization.
	 *
	 * @param OrgKey The key of the organization to disable.
	 * @exception Exception
	 */
	public final void disableOrg(long OrgKey) throws Exception {
		orgUtils.disableOrg(OrgKey);
	}

	/**
	 * Enables an organization.
	 *
	 * @param Org The name of the organization to enable.
	 * @exception Exception
	 */
	public final void enableOrg(String Org) throws Exception {
		orgUtils.enableOrg(getOrganization(Org));
	}

	/**
	 * Enables an organization.
	 *
	 * @param OrgKey The key of the organization to enable.
	 * @exception Exception
	 */
	public final void enableOrg(long OrgKey) throws Exception {
		orgUtils.enableOrg(OrgKey);
	}

	/**
	 * Deletes an organization.
	 *
	 * @param Org The name of the organization to delete.
	 * @exception Exception
	 */
	public final void deleteOrg(String Org) throws Exception {
		orgUtils.deleteOrg(getOrganization(Org));
	}

	/**
	 * Deletes an organization.
	 *
	 * @param OrgKey The key of the organization to delete.
	 * @exception Exception
	 */
	public final void deleteOrg(long OrgKey) throws Exception {
		orgUtils.deleteOrg(OrgKey);
	}

	/**
	 * Gets an array of user keys for the users associated with an organization.
	 *
	 * @param Org The name of the organization to get the associated user keys for..
	 * @return An array of user keys for the users associated with the organization.
	 * @exception Exception
	 */
	public final long[] getUsersInOrganization(String Org) throws Exception {
		return orgUtils.getUsersInOrganization(getOrganization(Org));
	}

	/**
	 * Gets an array of user keys for the users associated with an organization.
	 *
	 * @param OrgKey The key of the organization to get the associated user keys for..
	 * @return An array of user keys for the users associated with the organization.
	 * @exception Exception
	 */
	public final long[] getUsersInOrganization(long OrgKey) throws Exception {
		return orgUtils.getUsersInOrganization(OrgKey);
	}
	
	/**
	 * Adds a resource to the list of objects allowed for an organization.
	 * 
	 * @param Org The name of the organization to add the object allow to.
	 * @param ObjectName The name of the object type to allow for the organization.
	 * @param AllowSelfService <code>true</code> if the object should be allowed for 
	 *        self-request, or <code>false</code> if the object should not be self-requestable.
	 * @exception Exception
	 */
	public final void addAllowedObjectToOrganization(String Org, String ObjectName, boolean AllowSelfService) throws Exception {
		orgUtils.addAllowedObjectToOrganization(getOrganization(Org), getResourceObject(ObjectName), AllowSelfService);
	}
	
	/**
	 * Adds a resource to the list of objects allowed for an organization.
	 * 
	 * @param Org The name of the organization to add the object allow to.
	 * @param ObjectKey The key of the object type to allow for the organization.
	 * @param AllowSelfService <code>true</code> if the object should be allowed for 
	 *        self-request, or <code>false</code> if the object should not be self-requestable.
	 * @exception Exception
	 */
	public final void addAllowedObjectToOrganization(String Org, long ObjectKey, boolean AllowSelfService) throws Exception {
		orgUtils.addAllowedObjectToOrganization(getOrganization(Org), ObjectKey, AllowSelfService);
	}
	
	/**
	 * Adds a resource to the list of objects allowed for an organization.
	 * 
	 * @param OrgKey The key of the organization to add the object allow to.
	 * @param ObjectName The name of the object type to allow for the organization.
	 * @param AllowSelfService <code>true</code> if the object should be allowed for 
	 *        self-request, or <code>false</code> if the object should not be self-requestable.
	 * @exception Exception
	 */
	public final void addAllowedObjectToOrganization(long OrgKey, String ObjectName, boolean AllowSelfService) throws Exception {
		orgUtils.addAllowedObjectToOrganization(OrgKey, getResourceObject(ObjectName), AllowSelfService);
	}
	
	/**
	 * Adds a resource to the list of objects allowed for an organization.
	 * 
	 * @param OrgKey The key of the organization to add the object allow to.
	 * @param ObjectKey The key of the object type to allow for the organization.
	 * @param AllowSelfService <code>true</code> if the object should be allowed for 
	 *        self-request, or <code>false</code> if the object should not be self-requestable.
	 * @exception Exception
	 */
	public final void addAllowedObjectToOrganization(long OrgKey, long ObjectKey, boolean AllowSelfService) throws Exception {
		orgUtils.addAllowedObjectToOrganization(OrgKey, ObjectKey, AllowSelfService);
	}
	
	/**
	 * Removes a resource from the list of objects allowed for an organization.
	 * 
	 * @param Org The name of the organization to remove the object allow from.
	 * @param ObjectName The name of the object type to remove the allow for the organization.
	 * @exception Exception
	 */
	public final void removeAllowedObjectFromOrganization(String Org, String ObjectName) throws Exception {
		orgUtils.removeAllowedObjectFromOrganization(getOrganization(Org), getResourceObject(ObjectName));
	}
	
	/**
	 * Removes a resource from the list of objects allowed for an organization.
	 * 
	 * @param Org The name of the organization to remove the object allow from.
	 * @param ObjectKey The key of the object type to remove the allow for the organization.
	 * @exception Exception
	 */
	public final void removeAllowedObjectFromOrganization(String Org, long ObjectKey) throws Exception {
		orgUtils.removeAllowedObjectFromOrganization(getOrganization(Org), ObjectKey);
	}
	
	/**
	 * Removes a resource from the list of objects allowed for an organization.
	 * 
	 * @param OrgKey The key of the organization to remove the object allow from.
	 * @param ObjectName The name of the object type to remove the allow for the organization.
	 * @exception Exception
	 */
	public final void removeAllowedObjectFromOrganization(long OrgKey, String ObjectName) throws Exception {
		orgUtils.removeAllowedObjectFromOrganization(OrgKey, getResourceObject(ObjectName));
	}
	
	/**
	 * Removes a resource from the list of objects allowed for an organization.
	 * 
	 * @param OrgKey The key of the organization to remove the object allow from.
	 * @param ObjectKey The key of the object type to remove the allow for the organization.
	 * @exception Exception
	 */
	public final void removeAllowedObjectFromOrganization(long OrgKey, long ObjectKey) throws Exception {
		orgUtils.removeAllowedObjectFromOrganization(OrgKey, ObjectKey);
	}
	
	/**
	 * Gets a Map containing the object keys and names for objects allowed for an organization.
	 * 
	 * @param Org The name of the organization to get the allowed objects for.
	 * @return A Map containing the object keys and names for objects allowed for an organization.
	 * @exception Exception
	 */
	public final Map getAllowedObjectsForOrganization(String Org) throws Exception {
		return orgUtils.getAllowedObjectsForOrganization(getOrganization(Org));
	}
	
	/**
	 * Gets a Map containing the object keys and names for objects allowed for an organization.
	 * 
	 * @param OrgKey The key of the organization to get the allowed objects for.
	 * @return A Map containing the object keys and names for objects allowed for an organization.
	 * @exception Exception
	 */
	public final Map getAllowedObjectsForOrganization(long OrgKey) throws Exception {
		return orgUtils.getAllowedObjectsForOrganization(OrgKey);
	}
	
	/**
	 * Checks if an organization is disabled or not.
	 * 
	 * @param Org The name of the organization to check if it's disabled.
	 * @return <code>true</code> if the organization is disabled, or <code>false</code> if
	 *         the organization is not disabled.
	 * @exception Exception
	 */
	public final boolean isOrgDisabled(String Org) throws Exception {
		return orgUtils.isOrgDisabled(getOrganization(Org));
	}
	
	/**
	 * Checks if an organization is disabled or not.
	 * 
	 * @param OrgKey The key of the organization to check if it's disabled.
	 * @return <code>true</code> if the organization is disabled, or <code>false</code> if
	 *         the organization is not disabled.
	 * @exception Exception
	 */
	public final boolean isOrgDisabled(long OrgKey) throws Exception {
		return orgUtils.isOrgDisabled(OrgKey);
	}
	
	/**
	 * Checks if an organization is deleted/revoked or not.
	 * 
	 * @param Org The name of the organization to check if it's deleted.
	 * @return <code>true</code> if the organization is deleted, or <code>false</code> if
	 *         the organization is not deleted.
	 * @exception Exception
	 */
	public final boolean isOrgDeleted(String Org) throws Exception {
		return orgUtils.isOrgDeleted(getOrganization(Org));
	}
	
	/**
	 * Checks if an organization is deleted/revoked or not.
	 * 
	 * @param OrgKey The key of the organization to check if it's deleted.
	 * @return <code>true</code> if the organization is deleted, or <code>false</code> if
	 *         the organization is not deleted.
	 * @exception Exception
	 */
	public final boolean isOrgDeleted(long OrgKey) throws Exception {
		return orgUtils.isOrgDeleted(OrgKey);
	}
	
	/**
	 * Checks if an organization based resource is disabled or not.
	 * 
	 * @param Org The name of the organization that the resource is in.
	 * @param ProcessInstanceKey The process instance key of the object to check if it's disabled.
	 * @return <code>true</code> if the resource is deleted, or <code>false</code> if the 
	 *         resource is not disable
	 * @exception Exception
	 */
	public final boolean isOrgResourceDisabled(String Org, long ProcessInstanceKey) throws Exception {
		return orgUtils.isOrgResourceDisabled(getOrganization(Org), ProcessInstanceKey);
	}
	
	/**
	 * Checks if an organization based resource is disabled or not.
	 * 
	 * @param OrgKey The key of the organization that the resource is in.
	 * @param ProcessInstanceKey The process instance key of the object to check if it's disabled.
	 * @return <code>true</code> if the resource is deleted, or <code>false</code> if the 
	 *         resource is not disable
	 * @exception Exception
	 */
	public final boolean isOrgResourceDisabled(long OrgKey, long ProcessInstanceKey) throws Exception {
		return orgUtils.isOrgResourceDisabled(OrgKey, ProcessInstanceKey);
	}
	
	/**
	 * Checks if an organization based resource is deleted/revoked or not.
	 * 
	 * @param Org The name of the organization that the resource is in.
	 * @param ProcessInstanceKey The process instance key of the object to check if it's deleted.
	 * @return <code>true</code> if the resource is deleted, or <code>false</code> if the 
	 *         resource is not deleted.
	 * @exception Exception
	 */
	public final boolean isOrgResourceDeleted(String Org, long ProcessInstanceKey) throws Exception {
		return orgUtils.isOrgResourceDeleted(getOrganization(Org), ProcessInstanceKey);
	}
	
	/**
	 * Checks if an organization based resource is deleted/revoked or not.
	 * 
	 * @param OrgKey The key of the organization that the resource is in.
	 * @param ProcessInstanceKey The process instance key of the object to check if it's deleted.
	 * @return <code>true</code> if the resource is deleted, or <code>false</code> if the 
	 *         resource is not deleted.
	 * @exception Exception
	 */
	public final boolean isOrgResourceDeleted(long OrgKey, long ProcessInstanceKey) throws Exception {
		return orgUtils.isOrgResourceDeleted(OrgKey, ProcessInstanceKey);
	}

	/**
	 * Converts a timestamp (as retrieved from OIM).
	 *
	 * @param Input The date as retrieved from OIM.
	 * @param InputFormat The format string for the resulting date.
	 * @return The date string formated as per the specified format string.
	 * @exception Exception
	 */
	public final long parseDate(String Input, String InputFormat) throws Exception {
		return standardUtils.parseDate(Input, new String[] {InputFormat});
	}
	
	/**
	 * Converts a timestamp (as retrieved from OIM).
	 *
	 * @param Input The date as retrieved from OIM.
	 * @param InputFormats The format strings for the resulting date.
	 * @return The date string formated as per the specified format string.
	 * @exception Exception
	 */
	public final long parseDate(String Input, String[] InputFormats) throws Exception {
		return standardUtils.parseDate(Input, InputFormats);
	}

	/**
	 * Converts a date to a given string format.
	 *
	 * @param Input The date.
	 * @param OutputFormat The format string for the resulting date.
	 * @return The date string formated as per the specified format string.
	 * @exception Exception
	 */
	public final String formatDate(long Input, String OutputFormat) throws Exception {
		return standardUtils.formatDate(Input, OutputFormat);
	}
	
	/**
	 * Checks that the OIM system is running at least the specified version.  Throws a 
	 * {@link OIMNotSupportedOnThisVersionException} if the system version does not meet the specified 
	 * minimum.
	 *
	 * @param AtLeast The minimum version to allow.
	 * @exception Exception
	 */
	public final void checkOimVersion(String AtLeast) throws Exception {
		standardUtils.checkVersion(AtLeast);
	}
	
	/**
	 * Checks that the OIM system is running at least the specified version. 
	 *
	 * @param AtLeast The minimum version to allow.
	 * @return <code>true</code> if the current version of OIM is at least at the specified minimum,
	 *         or <code>false</code> if the current version of OIM is less the the minimum.
	 * @exception Exception
	 */
	public final boolean checkIfOimVersion(String AtLeast) throws Exception {
		return standardUtils.checkIfVersion(AtLeast);
	}
	
	/**
	 * Encrypts data using the same mechanism as OIM.
	 * 
	 * @param Data The data to encrypt.
	 * @return The encrypted data.
	 * @exception Exception
	 */
	public final String encryptForOim(String Data) throws Exception {
		return standardUtils.encrypt(Data);
	}
	
	/**
	 * Decrypts data using the same mechanism as OIM.
	 * 
	 * @param Data The data to decrypt.
	 * @return The decrypted data.
	 * @exception Exception
	 */
	public final String decryptForOim(String Data) throws Exception {
		return standardUtils.decrypt(Data);
	}
	
	/**
	 * Prints a Map's data out for debugging.
	 * 
	 * @param Data The Map to print.
	 * @exception Exception
	 */
	public final void printDebugDump(Map Data) throws Exception {
		standardUtils.printDebugDump(Data);
	}
	
	/**
	 * Prints a array of Map's data out for debugging.
	 * 
	 * @param Data The Map array to print.
	 * @exception Exception
	 */
	public final void printDebugDump(Map[] Data) throws Exception {
		standardUtils.printDebugDump(Data);
	}

	/**
	 * Prints a tcResultSet's data out for debugging.
	 * 
	 * @param Data The tcResultSet to print.
	 * @exception Exception
	 */
	public final void printDebugDump(tcResultSet Data) throws Exception {
		standardUtils.printDebugDump(Data);
	}
	
	/**
	 * Prints a Map's data out for information.
	 * 
	 * @param Data The Map to print.
	 * @exception Exception
	 */
	public final void printInfoDump(Map Data) throws Exception {
		standardUtils.printInfoDump(Data);
	}
	
	/**
	 * Prints a array of Map's data out for information.
	 * 
	 * @param Data The Map array to print.
	 * @exception Exception
	 */
	public final void printInfoDump(Map[] Data) throws Exception {
		standardUtils.printInfoDump(Data);
	}

	/**
	 * Prints a tcResultSet's data out for information.
	 * 
	 * @param Data The tcResultSet to print.
	 * @exception Exception
	 */
	public final void printInfoDump(tcResultSet Data) throws Exception {
		standardUtils.printInfoDump(Data);
	}

	/**
	 * Creates an OIM user.
	 *
	 * @param Username The username for the new user.
	 * @param FirstName The first name for the new user.
	 * @param LastName The last name for the new user.
	 * @param Password The password for the new user.
	 * @param OrgKey The instance key of the organization to place the new user in.
	 * @param Role The employee role for the new user.
	 * @param Type The account type for the new user.
	 * @exception Exception
	 */
	public final void createOimUser(String Username, String FirstName, String LastName, String Password, long OrgKey, String Role, String Type) throws Exception {
		userUtils.createUser(Username, FirstName, LastName, Password, OrgKey, Role, Type);
	}

	/**
	 * Creates an OIM user.
	 *
	 * @param Username The username for the new user.
	 * @param FirstName The first name for the new user.
	 * @param LastName The last name for the new user.
	 * @param Password The password for the new user.
	 * @param Org The name of the organization to place the new user in.
	 * @param Role The employee role for the new user.
	 * @param Type The account type for the new user.
	 * @exception Exception
	 */
	public final void createOimUser(String Username, String FirstName, String LastName, String Password, String Org, String Role, String Type) throws Exception {
		userUtils.createUser(Username, FirstName, LastName, Password, orgUtils.getOrganization(Org), Role, Type);
	}

	/**
	 * Creates an OIM user.
	 *
	 * @param UserData A Map containing the attributes and values for the new user.
	 * @exception Exception
	 */
	public final void createOimUser(Map UserData) throws Exception {
		userUtils.createUser(UserData);
	}

	/**
	 * Gets the key associated with a given user, or 0 is returned if the specified 
	 * user is not found.
	 *
	 * @param Username The user to search for.
	 * @return The user's key, or 0 if the user is not found.
	 * @exception Exception
	 */
	public final long getOimUser(String Username) throws Exception {
		return userUtils.getUser(Username);
	}

	/**
	 * Returns true if the specifed user exists.
	 *
	 * @param Username The user to search for.
	 * @return <code>true</code> if the user exists, or <code>false</code> if the user does
	 *         not exist.
	 * @exception Exception
	 */
	public final boolean oimUserExists(String Username) throws Exception {
		return userUtils.getUser(Username) != 0L;
	}

	/**
	 * Gets an array of Maps containing data for all users on the system.
	 *
	 * @return A Array of Map's containing the attribute value pairs for the resulting object.
	 * @exception Exception
	 */
	public final Map[] getAllOimUsers() throws Exception {
		return userUtils.getAllUsers(false);
	}

	/**
	 * Gets an array of Maps containing data for all users on the system.
	 *
	 * @param HideEncrypted <code>true</code> will mask out any encrypted values from the result set,
	 *                      and <code>false</code> will allow the encypted values to pass through.
	 * @return A Array of Map's containing the attribute value pairs for the resulting object.
	 * @exception Exception
	 */
	public final Map[] getAllOimUsers(boolean HideEncrypted) throws Exception {
		return userUtils.getAllUsers(HideEncrypted);
	}

	/**
	 * Disables an OIM user.
	 *
	 * @param Username The username of the user instance to disable.
	 * @exception Exception
	 */
	public final void disableOimUser(String Username) throws Exception {
		userUtils.disableUser(getOimUser(Username));
	}

	/**
	 * Disables an OIM user.
	 *
	 * @param UserKey The key of the user instance to disable.
	 * @exception Exception
	 */
	public final void disableOimUser(long UserKey) throws Exception {
		userUtils.disableUser(UserKey);
	}

	/**
	 * Enables an OIM user.
	 *
	 * @param Username The username of the user instance to enable.
	 * @exception Exception
	 */
	public final void enableOimUser(String Username) throws Exception {
		userUtils.enableUser(getOimUser(Username));
	}

	/**
	 * Enables an OIM user.
	 *
	 * @param UserKey The key of the user instance to enable.
	 * @exception Exception
	 */
	public final void enableOimUser(long UserKey) throws Exception {
		userUtils.enableUser(UserKey);
	}

	/**
	 * Deletes an OIM user.
	 *
	 * @param Username The username of the user instance to delete.
	 * @exception Exception
	 */
	public final void deleteOimUser(String Username) throws Exception {
		userUtils.deleteUser(getOimUser(Username));
	}

	/**
	 * Deletes an OIM user.
	 *
	 * @param UserKey The key of the user instance to delete.
	 * @exception Exception
	 */
	public final void deleteOimUser(long UserKey) throws Exception {
		userUtils.deleteUser(UserKey);
	}

	/**
	 * Given tuple to search for, this function returns an Array of Maps of attributes 
	 * and values for the resulting item.   An empty Array is returned if no matching 
	 * objects are found.
	 *
	 * @param Attribute The name of the to search for.
	 * @param Value The value of the attribute to search for.
	 * @return A Map containing the attribute value pairs for the resulting object.
	 * @exception Exception
	 */
	public final Map[] getOimUsersData(String Attribute, String Value) throws Exception {
		return userUtils.getUsersData(Attribute, Value, false);
	}

	/**
	 * Given tuple to search for, this function returns an Array of Maps of attributes 
	 * and values for the resulting item.   An empty Array is returned if no matching 
	 * objects are found.
	 *
	 * @param Attribute The name of the to search for.
	 * @param Value The value of the attribute to search for.
	 * @param HideEncrypted <code>true</code> will mask out any encrypted values from the result set,
	 *                      and <code>false</code> will allow the encypted values to pass through.
	 * @return A Map containing the attribute value pairs for the resulting object.
	 * @exception Exception
	 */
	public final Map[] getOimUsersData(String Attribute, String Value, boolean HideEncrypted) throws Exception {
		return userUtils.getUsersData(Attribute, Value, HideEncrypted);
	}

	/**
	 * Given tuple to search for, this function returns an Array of Maps of attributes and 
	 * values for the resulting item.   An empty Array is returned if the object is not found.
	 *
	 * @param SearchFor A collection of zero or more attribute-value tuples to search for.
	 * @return A Array of Map's containing the attribute value pairs for the resulting object, or an
	 *         empty Array if nothing is found.
	 * @exception Exception
	 */
	public final Map[] getOimUsersData(Map SearchFor) throws Exception {
		return userUtils.getUsersData(SearchFor, false);
	}

	/**
	 * Given tuple to search for, this function returns an Array of Maps of attributes and 
	 * values for the resulting item.   An empty Array is returned if the object is not found.
	 *
	 * @param SearchFor A collection of zero or more attribute-value tuples to search for.
	 * @param HideEncrypted <code>true</code> will mask out any encrypted values from the result set,
	 *                      and <code>false</code> will allow the encypted values to pass through.
	 * @return A Array of Map's containing the attribute value pairs for the resulting object, or an
	 *         empty Array if nothing is found.
	 * @exception Exception
	 */
	public final Map[] getOimUsersData(Map SearchFor, boolean HideEncrypted) throws Exception {
		return userUtils.getUsersData(SearchFor, HideEncrypted);
	}

	/**
	 * Given tuple to search for, this function returns a Map of attributes and values for 
	 * the resulting item.   An empty Map is returned if the object is not found.
	 *
	 * @param Attribute The name of the to search for.
	 * @param Value The value of the attribute to search for.
	 * @return A Map containing the attribute value pairs for the resulting object.
	 * @exception Exception
	 */
	public final Map getOimUserData(String Attribute, String Value) throws Exception {
		return userUtils.getUserData(Attribute, Value, false);
	}

	/**
	 * Given tuple to search for, this function returns a Map of attributes and values for 
	 * the resulting item.   An empty Map is returned if the object is not found.
	 *
	 * @param Attribute The name of the to search for.
	 * @param Value The value of the attribute to search for.
	 * @param HideEncrypted <code>true</code> will mask out any encrypted values from the result set,
	 *                      and <code>false</code> will allow the encypted values to pass through.
	 * @return A Map containing the attribute value pairs for the resulting object.
	 * @exception Exception
	 */
	public final Map getOimUserData(String Attribute, String Value, boolean HideEncrypted) throws Exception {
		return userUtils.getUserData(Attribute, Value, HideEncrypted);
	}

	/**
	 * Gets a collection of the attributes and values associated with the specified user.  Returns an
	 * empty Map if the user is not found.
	 *
	 * @param Username The username of the user get data for.
	 * @return A Map of the user attributes and values.
	 * @exception Exception
	 */
	public final Map getOimUserData(String Username) throws Exception {
		return userUtils.getUserData("Users.Key", Long.toString(getOimUser(Username)), false);
	}

	/**
	 * Gets a collection of the attributes and values associated with the specified user.  Returns an
	 * empty Map if the user is not found.
	 *
	 * @param Username The username of the user get data for.
	 * @param HideEncrypted <code>true</code> will mask out any encrypted values from the result set,
	 *                      and <code>false</code> will allow the encypted values to pass through.
	 * @return A Map of the user attributes and values.
	 * @exception Exception
	 */
	public final Map getOimUserData(String Username, boolean HideEncrypted) throws Exception {
		return userUtils.getUserData("Users.Key", Long.toString(getOimUser(Username)), HideEncrypted);
	}

	/**
	 * Gets a collection of the attributes and values associated with the specified user.  Returns an
	 * empty Map if the user is not found.
	 *
	 * @param UserKey The key of the user instance get data for.
	 * @return A Map of the user attributes and values.
	 * @exception Exception
	 */
	public final Map getOimUserData(long UserKey) throws Exception {
		return userUtils.getUserData("Users.Key", Long.toString(UserKey), false);
	}

	/**
	 * Gets a collection of the attributes and values associated with the specified user.  Returns an
	 * empty Map if the user is not found.
	 *
	 * @param UserKey The key of the user instance get data for.
	 * @param HideEncrypted <code>true</code> will mask out any encrypted values from the result set,
	 *                      and <code>false</code> will allow the encypted values to pass through.
	 * @return A Map of the user attributes and values.
	 * @exception Exception
	 */
	public final Map getOimUserData(long UserKey, boolean HideEncrypted) throws Exception {
		return userUtils.getUserData("Users.Key", Long.toString(UserKey), HideEncrypted);
	}

	/**
	 * Sets an attribute on an OIM user.
	 *
	 * @param UserKey The user instance key of the user to set the attribute on.
	 * @param Attribute The name of attribute to set.  For system provided columns, this is generally a field lookup, 
	 *                  for example <code>Users.Email</code>.  For user defined fields, this is the column name, for 
	 *                  example <code>USR_UDF_MYITEM</code>.
	 * @param Value The value to set for the specified attribute.
	 * @exception Exception
	 */
	public final void setOimUserAttribute(long UserKey, String Attribute, String Value) throws Exception {
		userUtils.setUserAttribute(UserKey, Attribute, Value);
	}

	/**
	 * Sets an attribute on an OIM user.
	 *
	 * @param Username The username of the user to set the attribute on.
	 * @param Attribute The name of attribute to set.  For system provided columns, this is generally a field lookup, 
	 *                  for example <code>Users.Email</code>.  For user defined fields, this is the column name, for 
	 *                  example <code>USR_UDF_MYITEM</code>.
	 * @param Value The value to set for the specified attribute.
	 * @exception Exception
	 */
	public final void setOimUserAttribute(String Username, String Attribute, String Value) throws Exception {
		userUtils.setUserAttribute(getOimUser(Username), Attribute, Value);
	}
	
	/**
	 * Sets an attribute on an OIM user.
	 *
	 * @param UserKey The user instance key of the user to set the attribute on.
	 * @param Data A Map of attributes and values to set for the user.
	 * @exception Exception
	 */
	public final void setOimUserAttributes(long UserKey, Map Data) throws Exception {
		userUtils.setUserAttributes(UserKey, Data);
	}
	
	/**
	 * Sets an attribute on an OIM user.
	 *
	 * @param Username The username of the user to set the attribute on.
	 * @param Data A Map of attributes and values to set for the user.
	 * @exception Exception
	 */
	public final void setOimUserAttributes(String Username, Map Data) throws Exception {
		userUtils.setUserAttributes(getOimUser(Username), Data);
	}

	/**
	 * Gets a list of groups that the user is a member of.
	 *
	 * @param UserKey The user instance key of the user to get the group membership for.
	 * @return An array of zero or more group names.
	 * @exception Exception
	 */
	public final String[] getOimGroupsForOimUser(long UserKey) throws Exception {
		return userUtils.getGroupsForUser(UserKey);
	}

	/**
	 * Gets a list of groups that the user is a member of.
	 *
	 * @param Username The username of the user to get the group membership for.
	 * @return An array of zero or more group names.
	 * @exception Exception
	 */
	public final String[] getOimGroupsForOimUser(String Username) throws Exception {
		return userUtils.getGroupsForUser(getOimUser(Username));
	}

	/**
	 * Check if the specified user account is disabled.
	 *
	 * @param Username The username of the user to check for disablement.
	 * @return <code>true</code> if the user is disabled, or <code>false</code> if the user is not.
	 * @exception Exception
	 */
	public final boolean isUserDisabled(String Username) throws Exception {
		return userUtils.isUserDisabled(getOimUser(Username));
	}

	/**
	 * Check if the specified user account is disabled.
	 *
	 * @param UserKey The user instance key of the user to check for disablement.
	 * @return <code>true</code> if the user is disabled, or <code>false</code> if the user is not.
	 * @exception Exception
	 */
	public final boolean isUserDisabled(long UserKey) throws Exception {
		return userUtils.isUserDisabled(UserKey);
	}

	/**
	 * Check if the specified user account is revoked.
	 *
	 * @param Username The username of the user to check for being revoked.
	 * @return <code>true</code> if the user is revoked, or <code>false</code> if the user is not.
	 * @exception Exception
	 */
	public final boolean isUserRevoked(String Username) throws Exception {
		return userUtils.isUserRevoked(getOimUser(Username));
	}

	/**
	 * Check if the specified user account is revoked.
	 *
	 * @param UserKey The user instance key of the user to check for being revoked.
	 * @return <code>true</code> if the user is revoked, or <code>false</code> if the user is not.
	 * @exception Exception
	 */
	public final boolean isUserRevoked(long UserKey) throws Exception {
		return userUtils.isUserRevoked(UserKey);
	}

	/**
	 * Gets details on the proxy for a user.  An empty Map is returned if the proxy is not found.
	 *
	 * @param Username The username of the user to find the proxy for,
	 * @param HideEncrypted <code>true</code> will mask out any encrypted values from the result set,
	 *                      and <code>false</code> will allow the encypted values to pass through.
	 * @return A Map containing the attribute value pairs for the resulting object, or an
	 *         empty Map if nothing is found.
	 * @exception Exception
	 */
	public final Map getProxyData(String Username, boolean HideEncrypted) throws Exception {
		return userUtils.getProxyData(getOimUser(Username), HideEncrypted);
	}

	/**
	 * Gets details on the proxy for a user.  An empty Map is returned if the proxy is not found.
	 *
	 * @param UserKey The key of the user to find the proxy for,
	 * @param HideEncrypted <code>true</code> will mask out any encrypted values from the result set,
	 *                      and <code>false</code> will allow the encypted values to pass through.
	 * @return A Map containing the attribute value pairs for the resulting object, or an
	 *         empty Map if nothing is found.
	 * @exception Exception
	 */
	public final Map getProxyData(long UserKey, boolean HideEncrypted) throws Exception {
		return userUtils.getProxyData(UserKey, HideEncrypted);
	}

	/**
	 * Sets one user as a the proxy of another.
	 *
	 * @param Username The username of the user to set the proxy for,
	 * @param ProxyUsername The username of the user to set as the proxy.
	 * @param StartDate The date on which the proxy will start.
	 * @param EndDate The date on which the proxy will end.
	 * @exception Exception
	 */
	public final void setProxy(String Username, String ProxyUsername, java.util.Date StartDate, java.util.Date EndDate) throws Exception {
		userUtils.setProxy(getOimUser(Username), getOimUser(ProxyUsername), StartDate, EndDate);
	}

	/**
	 * Sets one user as a the proxy of another.
	 *
	 * @param UserKey The key of the user to set the proxy for,
	 * @param ProxyUserKey The key of the user to set as the proxy.
	 * @param StartDate The date on which the proxy will start.
	 * @param EndDate The date on which the proxy will end.
	 * @exception Exception
	 */
	public final void setProxy(long UserKey, long ProxyUserKey, java.util.Date StartDate, java.util.Date EndDate) throws Exception {
		userUtils.setProxy(UserKey, ProxyUserKey, StartDate, EndDate);
	}

	/**
	 * Sets the password for an OIM user
	 *
	 * @param Username The username of the user to set the password for.
	 * @param Password The password to set for the user.
	 * @exception Exception
	 */
	public final void setOimUserPassword(String Username, String Password) throws Exception {
		userUtils.setUserPassword(getOimUser(Username), Password);
	}

	/**
	 * Sets the password for an OIM user
	 *
	 * @param UserKey The key of the user to set the password for.
	 * @param Password The password to set for the user.
	 * @exception Exception
	 */
	public final void setOimUserPassword(long UserKey, String Password) throws Exception {
		userUtils.setUserPassword(UserKey, Password);
	}

	/**
	 * Gets a map of question and answer values for the specified user.
	 *
	 * @param Username The username of the user to get the question and answers for.
	 * @return A Map containing the question as the key, and the answer as the value.
	 * @exception Exception 
	 */
	public final Map getChallengeQuestionsAndResponses(String Username) throws Exception {
		return userUtils.getChallengeQuestionsAndResponses(getOimUser(Username));
	}

	/**
	 * Gets a map of question and answer values for the specified user.
	 *
	 * @param UserKey The key of the user to get the question and answers for.
	 * @return A Map containing the question as the key, and the answer as the value.
	 * @exception Exception 
	 */
	public final Map getChallengeQuestionsAndResponses(long UserKey) throws Exception {
		return userUtils.getChallengeQuestionsAndResponses(UserKey);
	}

	/**
	 * Gets all the user keys of the users matching the specified status.
	 *
	 * @param Status The status of users to search for.
	 * @return An array of user keys of the users matching the specified status.
	 * @exception Exception 
	 */
	public final long[] getOimUserKeys(String Status) throws Exception {
		return userUtils.getUserKeys(Status);
	}
	
	/**
	 * Gets all of the user keys of the users matching the specified filter.
	 *
	 * @param SqlFilter The an SQL filter to use when searching for users.
	 * @return An array of user keys of the users matching the specified status.
	 * @exception Exception 
	 */
	public final long[] getFilteredOimUserKeys(String SqlFilter) throws Exception {
		return userUtils.getFilteredUserKeys(SqlFilter);
	}

	/**
	 * Gets the value of a specific attribute for a user.
	 *
	 * @param Username The username of the user to retrieve the value for.
	 * @param Attribute The name of the attribute to retrieve the value for.
	 * @return The value of the attribute, or an empty string if the attribute is not found.
	 * @exception Exception 
	 */
	public final String getOimUserAttribute(String Username, String Attribute) throws Exception {
		return userUtils.getUserAttribute(getOimUser(Username), Attribute);
	}

	/**
	 * Gets the value of a specific attribute for a user.
	 *
	 * @param UserKey The key of the user to retrieve the value for.
	 * @param Attribute The name of the attribute to retrieve the value for.
	 * @return The value of the attribute, or an empty string if the attribute is not found.
	 * @exception Exception 
	 */
	public final String getOimUserAttribute(long UserKey, String Attribute) throws Exception {
		return userUtils.getUserAttribute(UserKey, Attribute);
	}
	
	/**
	 * Sets a Map of question and answer values for the specified user.
	 *
	 * @param Username The username of the user to get the question and answers for.
	 * @param QuestionsAndAnswers A Map of the questions and responses to set for the user.
	 * @exception Exception 
	 */
	public final void setChallengeQuestionsAndResponses(String Username, Map QuestionsAndAnswers) throws Exception {
		userUtils.setChallengeQuestionsAndResponses(getOimUser(Username), QuestionsAndAnswers);
	}
	
	/**
	 * Sets a Map of question and answer values for the specified user.
	 *
	 * @param UserKey The key of the user to get the question and answers for.
	 * @param QuestionsAndAnswers A Map of the questions and responses to set for the user.
	 * @exception Exception 
	 */
	public final void setChallengeQuestionsAndResponses(long UserKey, Map QuestionsAndAnswers) throws Exception {
		userUtils.setChallengeQuestionsAndResponses(UserKey, QuestionsAndAnswers);
	}
	
	/**
	 * Checks if a user has set his challenge questions and responses.
	 * 
	 * @param Username The username of the user to check.
	 * @return <code>true</code> if the challenge questions are set, or <code>false</code>
	 *         if the responses have not been set yet.
	 * @exception Exception
	 */
	public final boolean challengeResponsesSet(String Username) throws Exception {
		return userUtils.challengeResponsesSet(getOimUser(Username));
	}
	
	/**
	 * Checks if a user has set his challenge questions and responses.
	 * 
	 * @param UserKey The key of the user to check.
	 * @return <code>true</code> if the challenge questions are set, or <code>false</code>
	 *         if the responses have not been set yet.
	 * @exception Exception
	 */
	public final boolean challengeResponsesSet(long UserKey) throws Exception {
		return userUtils.challengeResponsesSet(UserKey);
	}
	
	/**
	 * Checks if a user is required to change his password.
	 * 
	 * @param Username The username of the user to check.
	 * @return <code>true</code> if the password needs to be changed, or 
	 *         <code>false</code> if the password does not need to be changed.
	 * @exception Exception
	 */
	public final boolean passwordChangeRequired(String Username) throws Exception {
		return userUtils.passwordChangeRequired(getOimUser(Username));
	}
	
	/**
	 * Checks if a user is required to change his password.
	 * 
	 * @param UserKey The key of the user to check.
	 * @return <code>true</code> if the password needs to be changed, or 
	 *         <code>false</code> if the password does not need to be changed.
	 * @exception Exception
	 */
	public final boolean passwordChangeRequired(long UserKey) throws Exception {
		return userUtils.passwordChangeRequired(UserKey);
	}
	
	/**
	 * Checks that question and answers responses for a user are sufficient.
	 * 
	 * @param Username The username of the user to check the responses for.
	 * @param QuestionsAndAnswers A Map of the question and answer response for the user.
	 * @return <code>true</code> if the responses are considered acceptable, or
	 *         <code>false</code> if the response are not acceptable.
	 * @exception Exception
	 */
	public final boolean checkChallengeResponses(String Username, Map QuestionsAndAnswers) throws Exception {
		return userUtils.checkChallengeResponses(getOimUser(Username), QuestionsAndAnswers);
	}
	
	/**
	 * Checks that question and answers responses for a user are sufficient.
	 * 
	 * @param UserKey The key of the user to check the responses for.
	 * @param QuestionsAndAnswers A Map of the question and answer response for the user.
	 * @return <code>true</code> if the responses are considered acceptable, or
	 *         <code>false</code> if the response are not acceptable.
	 * @exception Exception
	 */
	public final boolean checkChallengeResponses(long UserKey, Map QuestionsAndAnswers) throws Exception {
		return userUtils.checkChallengeResponses(UserKey, QuestionsAndAnswers);
	}
	
	/**
	 * Sets an attribute on an OIM user via a recon event.
	 *
	 * @param Username The username of the user to set the attributes on.
	 * @param Data A Map of attributes and values to set for the user.
	 * @exception Exception
	 */
	public final void setOimUserAttributesAsync(String Username, Map Data) throws Exception {
		userUtils.setUserAttributesAsync(getOimUser(Username), Data);
	}
	
	/**
	 * Sets an attribute on an OIM user via a recon event.
	 *
	 * @param UserKey The user instance key of the user to set the attributes on.
	 * @param Data A Map of attributes and values to set for the user.
	 * @exception Exception
	 */
	public final void setOimUserAttributesAsync(long UserKey, Map Data) throws Exception {
		userUtils.setUserAttributesAsync(UserKey, Data);
	}
	
	/**
	 * Unlocks a user account.
	 * 
	 * @param Username The username of the user to unlock.
	 * @exception Exception
	 */
	public final void unlockOimUser(String Username) throws Exception {
		userUtils.unlockUser(getOimUser(Username));
	}
	
	/**
	 * Unlocks a user account.
	 * 
	 * @param UserKey The key of the user to unlock.
	 * @exception Exception
	 */
	public final void unlockOimUser(long UserKey) throws Exception {
		userUtils.unlockUser(UserKey);
	}
	
	/**
	 * Forces an access policy re-evaluation for a user.
	 * 
	 * @param Username The username of the user.
	 * @exception Exception
	 */
	public final void evaluatePolicies(String Username) throws Exception {
		userUtils.evaluatePolicies(getOimUser(Username));
	}
	
	/**
	 * Forces an access policy re-evaluation for a user.
	 * 
	 * @param UserKey The key of the user.
	 * @exception Exception
	 */
	public final void evaluatePolicies(long UserKey) throws Exception {
		userUtils.evaluatePolicies(UserKey);
	}

	/**
	 * Directly provisions an instance of an object to a user.
	 *
	 * @param Username The username of the user to provision the object to.
	 * @param ObjectName The name of the object to provision to the user.
	 * @return The object instance for the new instance.
	 * @exception Exception
	 */
	public final ResourceData provisionNewResource(String Username, String ObjectName) throws Exception {
		return resObjectUtils.provisionNewResource(getOimUser(Username), getResourceObject(ObjectName));
	}
        
        public final long provisionNewObject(String Username, String ObjectName) throws Exception {
		return resObjectUtils.provisionNewObject(getOimUser(Username), getResourceObject(ObjectName));
	}

	/**
	 * Directly provisions an instance of an object to a user.
	 *
	 * @param UserKey The key of the user to provision the object to.
	 * @param ObjectName The name of the object to provision to the user.
	 * @return The object instance for the new instance.
	 * @exception Exception
	 */
	public final ResourceData provisionNewResource(long UserKey, String ObjectName) throws Exception {
		return resObjectUtils.provisionNewResource(UserKey, getResourceObject(ObjectName));
	}
        
        public final long provisionNewObject(long UserKey, String ObjectName) throws Exception {
		return resObjectUtils.provisionNewObject(UserKey, getResourceObject(ObjectName));
	}

	/**
	 * Directly provisions an instance of an object to a user.
	 *
	 * @param Username The username of the user to provision the object to.
	 * @param ObjectKey The key of the object type to provision to the user.
	 * @return The object instance for the new instance.
	 * @exception Exception
	 */
	public final ResourceData provisionNewResource(String Username, long ObjectKey) throws Exception {
		return resObjectUtils.provisionNewResource(getOimUser(Username), ObjectKey);
	}
        
        public final long provisionNewObject(String Username, long ObjectKey) throws Exception {
		return resObjectUtils.provisionNewObject(getOimUser(Username), ObjectKey);
	}

	/**
	 * Directly provisions an instance of an object to a user.
	 *
	 * @param UserKey The key of the user to provision the object to.
	 * @param ObjectKey The key of the object type to provision to the user.
	 * @return The object instance for the new instance.
	 * @exception Exception
	 */
	public final ResourceData provisionNewResource(long UserKey, long ObjectKey) throws Exception {
		return resObjectUtils.provisionNewResource(UserKey, ObjectKey);
	}
        
        public final long provisionNewObject(long UserKey, long ObjectKey) throws Exception {
		return resObjectUtils.provisionNewObject(UserKey, ObjectKey);
	}

	/**
	 * Enables an instance of an object to a user.
	 *
	 * @param Username The username of the user to provision the object to.
	 * @param ObjectInstanceKey The key of the object instance to enable for the user.
	 * @exception Exception
	 */
	public final void enableOimResource(String Username, long ObjectInstanceKey) throws Exception {
		resObjectUtils.enableResource(getOimUser(Username), ObjectInstanceKey);
	}

	/**
	 * Enables an instance of an object to a user.
	 *
	 * @param UserKey The key of the user to provision the object to.
	 * @param ObjectInstanceKey The key of the object instance to enable for the user.
	 * @exception Exception
	 */
	public final void enableOimResource(long UserKey, long ObjectInstanceKey) throws Exception {
		resObjectUtils.enableResource(UserKey, ObjectInstanceKey);
	}

	/**
	 * Disables an instance of an object to a user.
	 *
	 * @param Username The username of the user to provision the object to.
	 * @param ObjectInstanceKey The key of the object instance to disable for the user.
	 * @exception Exception
	 */
	public final void disableOimResource(String Username, long ObjectInstanceKey) throws Exception {
		resObjectUtils.disableResource(getOimUser(Username), ObjectInstanceKey);
	}

	/**
	 * Disables an instance of an object to a user.
	 *
	 * @param UserKey The key of the user to provision the object to.
	 * @param ObjectInstanceKey The key of the object instance to disable for the user.
	 * @exception Exception
	 */
	public final void disableOimResource(long UserKey, long ObjectInstanceKey) throws Exception {
		resObjectUtils.disableResource(UserKey, ObjectInstanceKey);
	}

	/**
	 * Deletes/Revokes an instance of an object from a user.
	 *
	 * @param Username The username of the user to provision the object to.
	 * @param ObjectInstanceKey The key of the object instance to delete from the user.
	 * @exception Exception
	 */
	public final void deleteOimResource(String Username, long ObjectInstanceKey) throws Exception {
		resObjectUtils.deleteResource(getOimUser(Username), ObjectInstanceKey);
	}

	/**
	 * Deletes/Revokes an instance of an object from a user.
	 *
	 * @param UserKey The key of the user to provision the object to.
	 * @param ObjectInstanceKey The key of the object instance to delete from the user.
	 * @exception Exception
	 */
	public final void deleteOimResource(long UserKey, long ObjectInstanceKey) throws Exception {
		resObjectUtils.deleteResource(UserKey, ObjectInstanceKey);
	}

	/**
	 * Locates the object key for a given resource object name, or 0 if the resource
	 * object is not found.
	 *
	 * @param Name The name of the resource object to retrieve the key for.
	 * @return The key of the resource object, or 0 if the object is not found.
	 * @exception Exception
	 */
	public final long getResourceObject(String Name) throws Exception {
		return resObjectUtils.getResourceObject(Name);
	}

	/**
	 * Gets the value of the specified field for a resource object.
	 *
	 * @param Name The name of the resource object to get the value for.
	 * @param Field The name of the field to retrieve a value for.
	 * @return The value of the field for the specified resource object, or an empty string if
	 *         the value is not found.
	 * @exception Exception
	 */
	public final String getResourceAttribute(String Name, String Field) throws Exception {
		return resObjectUtils.getResourceAttribute(getResourceObject(Name), Field);
	}

	/**
	 * Gets the value of the specified field for a resource object.
	 *
	 * @param ObjectKey The key of the resource object to get the value for.
	 * @param Field The name of the field to retrieve a value for.
	 * @return The value of the field for the specified resource object, or an empty string if
	 *         the value is not found.
	 * @exception Exception
	 */
	public final String getResourceAttribute(long ObjectKey, String Field) throws Exception {
		return resObjectUtils.getResourceAttribute(ObjectKey, Field);
	}

	/**
	 * Gets the values for all fields for a resource object.
	 *
	 * @param Name The name of the resource object to get the values for.
	 * @return A map containing the attribute value pairs for the resource instance.
	 * @exception Exception
	 */
	public final Map getResourceAttributes(String Name) throws Exception {
		return resObjectUtils.getResourceAttributes(getResourceObject(Name));
	}

	/**
	 * Gets the values for all fields for a resource object.
	 *
	 * @param ObjectKey The key of the resource object to get the values for.
	 * @return A map containing the attribute value pairs for the resource instance.
	 * @exception Exception
	 */
	public final Map getResourceAttributes(long ObjectKey) throws Exception {
		return resObjectUtils.getResourceAttributes(ObjectKey);
	}
	
	/**
	 * Gets the names of all the matching resources of a given type.
	 * 
	 * @param Type The type of resources to get the names of.
	 * @return An array of zero or more names.
	 * @exception Exception
	 */
	public final String[] getResourcesOfType(String Type) throws Exception {
		return resObjectUtils.getResourcesOfType(Type);
	}

	/**
	 * Gets an array of maps, one record each resource object associated with a user.  
	 * 
	 * @param Username The username of the user to whom the objects are provisioned to.
	 * @param ActiveOnly <code>true</code> if only Active resource instances should be retrieved, or
	 *                   <code>false</code> if all resources instances should be retrieved.
	 * @return A Map of zero or more object instances for active objects.
	 * @exception Exception
	 */
	public final Map[] getObjectsForUser(String Username, boolean ActiveOnly) throws Exception {
		return resObjectUtils.getResourceInstancesForUser(getOimUser(Username), 0L, ActiveOnly);
	}

	/**
	 * Gets an array of maps, one record each resource object associated with a user.  
	 * 
	 * @param UserKey The key of the user to whom the objects are provisioned to.
	 * @param ActiveOnly <code>true</code> if only Active resource instances should be retrieved, or
	 *                   <code>false</code> if all resources instances should be retrieved.
	 * @return A Map of zero or more object instances for active objects.
	 * @exception Exception
	 */
	public final Map[] getObjectsForUser(long UserKey, boolean ActiveOnly) throws Exception {
		return resObjectUtils.getResourceInstancesForUser(UserKey, 0L, ActiveOnly);
	}

	/**
	 * Gets an array of maps, one record each resource object associated with a user.  
	 * 
	 * @param ObjectName The name of the resource object type to search for.
	 * @param Username The username of the user to whom the objects are provisioned to.
	 * @param ActiveOnly <code>true</code> if only Active resource instances should be retrieved, or
	 *                   <code>false</code> if all resources instances should be retrieved.
	 * @return A Map of zero or more object instances for active objects.
	 * @exception Exception
	 */
	public final Map[] getObjectsForUser(String ObjectName, String Username, boolean ActiveOnly) throws Exception {
		return resObjectUtils.getResourceInstancesForUser(getOimUser(Username), getResourceObject(ObjectName), ActiveOnly);
	}

	/**
	 * Gets an array of maps, one record each resource object associated with a user.  
	 * 
	 * @param ObjectName The name of the resource object type to search for.
	 * @param UserKey The key of the user to whom the objects are provisioned to.
	 * @param ActiveOnly <code>true</code> if only Active resource instances should be retrieved, or
	 *                   <code>false</code> if all resources instances should be retrieved.
	 * @return A Map of zero or more object instances for active objects.
	 * @exception Exception
	 */
	public final Map[] getObjectsForUser(String ObjectName, long UserKey, boolean ActiveOnly) throws Exception {
		return resObjectUtils.getResourceInstancesForUser(UserKey, getResourceObject(ObjectName), ActiveOnly);
	}

	/**
	 * Gets an array of maps, one record each resource object associated with a user.  
	 * 
	 * @param ObjectKey The key of the resource object type to search for.
	 * @param Username The username of the user to whom the objects are provisioned to.
	 * @param ActiveOnly <code>true</code> if only Active resource instances should be retrieved, or
	 *                   <code>false</code> if all resources instances should be retrieved.
	 * @return A Map of zero or more object instances for active objects.
	 * @exception Exception
	 */
	public final Map[] getObjectsForUser(long ObjectKey, String Username, boolean ActiveOnly) throws Exception {
		return resObjectUtils.getResourceInstancesForUser(getOimUser(Username), ObjectKey, ActiveOnly);
	}

	/**
	 * Gets an array of maps, one record each resource object associated with a user.  
	 * 
	 * @param ObjectKey The key of the resource object type to search for.
	 * @param UserKey The key of the user to whom the objects are provisioned to.
	 * @param ActiveOnly <code>true</code> if only Active resource instances should be retrieved, or
	 *                   <code>false</code> if all resources instances should be retrieved.
	 * @return A Map of zero or more object instances for active objects.
	 * @exception Exception
	 */
	public final Map[] getObjectsForUser(long ObjectKey, long UserKey, boolean ActiveOnly) throws Exception {
		return resObjectUtils.getResourceInstancesForUser(UserKey, ObjectKey, ActiveOnly);
	}

	/**
	 * Gets an array of maps, one record each resource object associated with a user.  
	 * 
	 * @param Username The username of the user to whom the objects are provisioned to.
	 * @return A Map of zero or more object instances for active objects.
	 * @exception Exception
	 */
	public final Map[] getAllObjectsForUser(String Username) throws Exception {
		return resObjectUtils.getResourceInstancesForUser(getOimUser(Username), 0L, false);
	}

	/**
	 * Gets an array of maps, one record each resource object associated with a user.  
	 * 
	 * @param UserKey The key of the user to whom the objects are provisioned to.
	 * @return A Map of zero or more object instances for active objects.
	 * @exception Exception
	 */
	public final Map[] getAllObjectsForUser(long UserKey) throws Exception {
		return resObjectUtils.getResourceInstancesForUser(UserKey, 0L, false);
	}

	/**
	 * Gets an array of maps, one record each resource object associated with a user.  
	 * 
	 * @param ObjectName The name of the resource object type to search for.
	 * @param Username The username of the user to whom the objects are provisioned to.
	 * @return A Map of zero or more object instances for active objects.
	 * @exception Exception
	 */
	public final Map[] getAllObjectsForUser(String ObjectName, String Username) throws Exception {
		return resObjectUtils.getResourceInstancesForUser(getOimUser(Username), getResourceObject(ObjectName), false);
	}

	/**
	 * Gets an array of maps, one record each resource object associated with a user.  
	 * 
	 * @param ObjectName The name of the resource object type to search for.
	 * @param UserKey The key of the user to whom the objects are provisioned to.
	 * @return A Map of zero or more object instances for active objects.
	 * @exception Exception
	 */
	public final Map[] getAllObjectsForUser(String ObjectName, long UserKey) throws Exception {
		return resObjectUtils.getResourceInstancesForUser(UserKey, getResourceObject(ObjectName), false);
	}

	/**
	 * Gets an array of maps, one record each resource object associated with a user.  
	 * 
	 * @param ObjectKey The key of the resource object type to search for.
	 * @param Username The username of the user to whom the objects are provisioned to.
	 * @return A Map of zero or more object instances for active objects.
	 * @exception Exception
	 */
	public final Map[] getAllObjectsForUser(long ObjectKey, String Username) throws Exception {
		return resObjectUtils.getResourceInstancesForUser(getOimUser(Username), ObjectKey, false);
	}

	/**
	 * Gets an array of maps, one record each resource object associated with a user.  
	 * 
	 * @param ObjectKey The key of the resource object type to search for.
	 * @param UserKey The key of the user to whom the objects are provisioned to.
	 * @return A Map of zero or more object instances for active objects.
	 * @exception Exception
	 */
	public final Map[] getAllObjectsForUser(long ObjectKey, long UserKey) throws Exception {
		return resObjectUtils.getResourceInstancesForUser(UserKey, ObjectKey, false);
	}

	/**
	 * Gets a Map of resource object instance keys that are actively provisioned to the specified user.
	 * The object instance key is the key in the Map, and the object status is the value.
	 *
	 * @param Username The username of the user to whom the objects are provisioned to.
	 * @return A Map of zero or more object instances for active objects.
	 * @exception Exception
	 */
	public final Map getActiveObjectsForUser(String Username) throws Exception {
		return resObjectUtils.getActiveObjectsForUser(0L, getOimUser(Username));
	}

	/**
	 * Gets a Map of resource object instance keys that are actively provisioned to the specified user.
	 * The object instance key is the key in the Map, and the object status is the value.
	 * 
	 * @param UserKey The key of the user to whom the objects are provisioned to.
	 * @return A Map of zero or more object instances for active objects.
	 * @exception Exception
	 */
	public final Map getActiveObjectsForUser(long UserKey) throws Exception {
		return resObjectUtils.getActiveObjectsForUser(0L, UserKey);
	}

	/**
	 * Gets a Map of resource object instance keys that are actively provisioned to the specified user 
	 * of the given resource object type.  The object instance key is the key in the Map, and the
	 * object status is the value.
	 * 
	 * @param ObjectName The name of the resource object type to search for.
	 * @param Username The username of the user to whom the objects are provisioned to.
	 * @return A Map of zero or more object instances for active objects fitting the above criteria.
	 * @exception Exception
	 */
	public final Map getActiveObjectsForUser(String ObjectName, String Username) throws Exception {
		return resObjectUtils.getActiveObjectsForUser(getResourceObject(ObjectName), getOimUser(Username));
	}

	/**
	 * Gets a Map of resource object instance keys that are actively provisioned to the specified user 
	 * of the given resource object type.  The object instance key is the key in the Map, and the
	 * object status is the value.
	 * 
	 * @param ObjectKey The key of the resource object type to search for.
	 * @param Username The username of the user to whom the objects are provisioned to.
	 * @return A Map of zero or more object instances for active objects fitting the above criteria.
	 * @exception Exception
	 */
	public final Map getActiveObjectsForUser(long ObjectKey, String Username) throws Exception {
		return resObjectUtils.getActiveObjectsForUser(ObjectKey, getOimUser(Username));
	}

	/**
	 * Gets a Map of resource object instance keys that are actively provisioned to the specified user 
	 * of the given resource object type.  The object instance key is the key in the Map, and the
	 * object status is the value.
	 * 
	 * @param ObjectName The name of the resource object type to search for.
	 * @param UserKey The key of the user to whom the objects are provisioned to.
	 * @return A Map of zero or more object instances for active objects fitting the above criteria.
	 * @exception Exception
	 */
	public final Map getActiveObjectsForUser(String ObjectName, long UserKey) throws Exception {
		return resObjectUtils.getActiveObjectsForUser(getResourceObject(ObjectName), UserKey);
	}

	/**
	 * Gets a Map of resource object instance keys that are actively provisioned to the specified user 
	 * of the given resource object type.  The object instance key is the key in the Map, and the
	 * object status is the value.
	 * 
	 * @param ObjectKey The key of the resource object type to search for.
	 * @param UserKey The key of the user to whom the objects are provisioned to.
	 * @return A Map of zero or more object instances for active objects fitting the above criteria.
	 * @exception Exception
	 */
	public final Map getActiveObjectsForUser(long ObjectKey, long UserKey) throws Exception {
		return resObjectUtils.getActiveObjectsForUser(ObjectKey, UserKey);
	}

	/**
	 * Given a process instance key, this finds the corresponding object instance key for the user.
	 *
	 * @param ProcessInstanceKey The key of the process instace to search for.
	 * @param Username The username of the user to whom the process is for.
	 * @return The object instance key associated with the process.
	 * @exception Exception
	 */
	public final long getObjectInstanceKey(long ProcessInstanceKey, String Username) throws Exception {
		return resObjectUtils.getObjectInstanceKey(ProcessInstanceKey, getOimUser(Username));
	}

	/**
	 * Given a process instance key, this finds the corresponding object instance key for the user.
	 *
	 * @param ProcessInstanceKey The key of the process instace to search for.
	 * @param UserKey The key of the user to whom the process is for.
	 * @return The object instance key associated with the process.
	 * @exception Exception
	 */
	public final long getObjectInstanceKey(long ProcessInstanceKey, long UserKey) throws Exception {
		return resObjectUtils.getObjectInstanceKey(ProcessInstanceKey, UserKey);
	}

	/**
	 * Given a process instance key, this finds the corresponding object instance key for the user.
	 *
	 * @param ObjectInstanceKey The key of the object instace to search for.
	 * @param Username The key of the user to whom the object instance is for.
	 * @return The object instance key associated with the process.
	 * @exception Exception
	 */
	public final long getProcessInstanceKey(long ObjectInstanceKey, String Username) throws Exception {
		return resObjectUtils.getProcessInstanceKey(ObjectInstanceKey, getOimUser(Username));
	}

	/**
	 * Given a process instance key, this finds the corresponding object instance key for the user.
	 *
	 * @param ObjectInstanceKey The key of the object instace to search for.
	 * @param UserKey The key of the user to whom the object instance is for.
	 * @return The object instance key associated with the process.
	 * @exception Exception
	 */
	public final long getProcessInstanceKey(long ObjectInstanceKey, long UserKey) throws Exception {
		return resObjectUtils.getProcessInstanceKey(ObjectInstanceKey, UserKey);
	}

	/**
	 * Gets a list of user keys for all users associated with a given object.
	 *
	 * @param ObjectName The name of the resource object to retrieve the associated users for.
	 * @return An array of user keys for all users associated with this object.
	 * @exception Exception
	 */
	public final long[] getResourceUsers(String ObjectName) throws Exception {
		return resObjectUtils.getUsers(getResourceObject(ObjectName), "");
	}

	/**
	 * Gets a list of user keys for all users associated with a given object and matching the 
	 * specified object status.
	 *
	 * @param ObjectName The name of the resource object to retrieve the associated users for.
	 * @param Status The status of the object to search for (i.e. Provisioned, Disabled...)
	 * @return An array of user keys for all users associated with this object.
	 * @exception Exception
	 */
	public final long[] getResourceUsers(String ObjectName, String Status) throws Exception {
		return resObjectUtils.getUsers(getResourceObject(ObjectName), Status);
	}

	/**
	 * Gets a list of user keys for all users associated with a given object.
	 *
	 * @param ObjectKey The key of the resource object type to retrieve the associated users for.
	 * @return An array of user keys for all users associated with this object.
	 * @exception Exception
	 */
	public final long[] getResourceUsers(long ObjectKey) throws Exception {
		return resObjectUtils.getUsers(ObjectKey, "");
	}

	/**
	 * Gets a list of user keys for all users associated with a given object and matching the 
	 * specified object status.
	 *
	 * @param ObjectKey The key of the resource object type to retrieve the associated users for.
	 * @param Status The status of the object to search for (i.e. Provisioned, Disabled...)
	 * @return An array of user keys for all users associated with this object.
	 * @exception Exception
	 */
	public final long[] getResourceUsers(long ObjectKey, String Status) throws Exception {
		return resObjectUtils.getUsers(ObjectKey, Status);
	}

	/**
	 * Gets a list of process instance keys for a given object type.
	 *
	 * @param ObjectName The name of the resource object to retrieve the associated users for.
	 * @return An array of process instance keys for all instances of this object.
	 * @exception Exception
	 */
	public final long[] getResourceInstances(String ObjectName) throws Exception {
		return resObjectUtils.getInstances(getResourceObject(ObjectName), "");
	}

	/**
	 * Gets a list of process instance keys for a given object type and matching the specified object 
	 * status.
	 *
	 * @param ObjectName The name of the resource object to retrieve the associated users for.
	 * @param Status The status of the object to search for (i.e. Provisioned, Disabled...)
	 * @return An array of process instance keys for all instances of this object matching the specified 
	 *         status.
	 * @exception Exception
	 */
	public final long[] getResourceInstances(String ObjectName, String Status) throws Exception {
		return resObjectUtils.getInstances(getResourceObject(ObjectName), Status);
	}

	/**
	 * Gets a list of process instance keys for a given object type.
	 *
	 * @param ObjectKey The key of the resource object type to retrieve the associated users for.
	 * @return An array of process instance keys for all instances of this object.
	 * @exception Exception
	 */
	public final long[] getResourceInstances(long ObjectKey) throws Exception {
		return resObjectUtils.getInstances(ObjectKey, "");
	}

	/**
	 * Gets a list of process instance keys for a given object type and matching the specified object 
	 * status.
	 *
	 * @param ObjectKey The key of the resource object type to retrieve the associated users for.
	 * @param Status The status of the object to search for (i.e. Provisioned, Disabled...)
	 * @return An array of process instance keys for all instances of this object matching the specified 
	 *         status.
	 * @exception Exception
	 */
	public final long[] getResourceInstances(long ObjectKey, String Status) throws Exception {
		return resObjectUtils.getInstances(ObjectKey, Status);
	}

	/**
	 * Gets a list of user, object instance and process instances keys for all instances a 
	 * given object.
	 *
	 * @param ObjectName The name of the resource object type to search for.
	 * @return An array of {@link OIMObjectInstanceTriple}
	 * @exception Exception
	 */
	public final OIMObjectInstanceTriple[] getDetailedInstances(String ObjectName) throws Exception {
		return resObjectUtils.getDetailedInstances(getResourceObject(ObjectName), "");
	}

	/**
	 * Gets a list of user, object instance and process instances keys for all instances a 
	 * given object and matching the specified object status.
	 *
	 * @param ObjectName The name of the resource object type to search for.
	 * @param Status The status of the object to search for (i.e. Provisioned, Disabled...)
	 * @return An array of {@link OIMObjectInstanceTriple}
	 * @exception Exception
	 */
	public final OIMObjectInstanceTriple[] getDetailedInstances(String ObjectName, String Status) throws Exception {
		return resObjectUtils.getDetailedInstances(getResourceObject(ObjectName), Status);
	}

	/**
	 * Gets a list of user, object instance and process instances keys for all instances a 
	 * given object.
	 *
	 * @param ObjectKey The key of the resource object type to search for.
	 * @return An array of {@link OIMObjectInstanceTriple}
	 * @exception Exception
	 */
	public final OIMObjectInstanceTriple[] getDetailedInstances(long ObjectKey) throws Exception {
		return resObjectUtils.getDetailedInstances(ObjectKey, "");
	}

	/**
	 * Gets a list of user, object instance and process instances keys for all instances a 
	 * given object and matching the specified object status.
	 *
	 * @param ObjectKey The key of the resource object type to search for.
	 * @param Status The status of the object to search for (i.e. Provisioned, Disabled...)
	 * @return An array of {@link OIMObjectInstanceTriple}
	 * @exception Exception
	 */
	public final OIMObjectInstanceTriple[] getDetailedInstances(long ObjectKey, String Status) throws Exception {
		return resObjectUtils.getDetailedInstances(ObjectKey, Status);
	}

	/**
	 * Checks if a resource instance is disabled or not.
	 *
	 * @param Username The username of the user to that owns the resource object to be checked.
	 * @param ObjectInstanceKey The key of the object instance to check for being disabled.
	 * @return <code>true</code> if the object is disabled, or <code>false</code> if the object is not.
	 * @exception Exception
	 */
	public final boolean isResourceDisabled(String Username, long ObjectInstanceKey) throws Exception {
		return resObjectUtils.isResourceDisabled(getOimUser(Username), ObjectInstanceKey);
	}

	/**
	 * Checks if a resource instance is disabled or not.
	 *
	 * @param UserKey The key of the user to that owns the resource object to be checked.
	 * @param ObjectInstanceKey The key of the object instance to check for being disabled.
	 * @return <code>true</code> if the object is disabled, or <code>false</code> if the object is not.
	 * @exception Exception
	 */
	public final boolean isResourceDisabled(long UserKey, long ObjectInstanceKey) throws Exception {
		return resObjectUtils.isResourceDisabled(UserKey, ObjectInstanceKey);
	}

	/**
	 * Checks if a resource instance is deleted/revoked or not.
	 *
	 * @param Username The username of the user to that owns the resource object to be checked.
	 * @param ObjectInstanceKey The key of the object instance to check for being revoked.
	 * @return <code>true</code> if the object is revoked, or <code>false</code> if the object is not.
	 * @exception Exception
	 */
	public final boolean isResourceRevoked(String Username, long ObjectInstanceKey) throws Exception {
		return resObjectUtils.isResourceRevoked(getOimUser(Username), ObjectInstanceKey);
	}

	/**
	 * Checks if a resource instance is deleted/revoked or not.
	 *
	 * @param UserKey The key of the user to that owns the resource object to be checked.
	 * @param ObjectInstanceKey The key of the object instance to check for being revoked.
	 * @return <code>true</code> if the object is revoked, or <code>false</code> if the object is not.
	 * @exception Exception
	 */
	public final boolean isResourceRevoked(long UserKey, long ObjectInstanceKey) throws Exception {
		return resObjectUtils.isResourceRevoked(UserKey, ObjectInstanceKey);
	}
	
	/**
	 * Converts a regular resource instance into a service account.
	 * 
	 * @param Username The username of the user that owns the resource object.
	 * @param ObjectInstanceKey The key of the object instance to make a service account.
	 * @exception Exception
	 */
	public final void setAsServiceAccount(String Username, long ObjectInstanceKey) throws Exception {
		resObjectUtils.setAsServiceAccount(getOimUser(Username), ObjectInstanceKey);
	}
        
        /**
        * return all the form info associated with this resource
        * @param resourceName
        * @return
        * @throws Exception 
        */
        public final Map[] getResourceFormInfo(String resourceName) throws Exception
        {
            return resObjectUtils.getResourceFormInfo(resourceName);
        }
	
	/**
	 * Converts a regular resource instance into a service account.
	 * 
	 * @param UserKey The key of the user that owns the resource object.
	 * @param ObjectInstanceKey The key of the object instance to make a service account.
	 * @exception Exception
	 */
	public final void setAsServiceAccount(long UserKey, long ObjectInstanceKey) throws Exception {
		resObjectUtils.setAsServiceAccount(UserKey, ObjectInstanceKey);
	}
	
	/**
	 * Converts a service account back to a regular resource instance.
	 * 
	 * @param Username The username of the user that owns the resource object.
	 * @param ObjectInstanceKey The key of the object instance to no longer be a service account.
	 * @exception Exception
	 */
	public final void unsetAsServiceAccount(String Username, long ObjectInstanceKey) throws Exception {
		resObjectUtils.unsetAsServiceAccount(getOimUser(Username), ObjectInstanceKey);
	}
	
	/**
	 * Converts a service account back to a regular resource instance.
	 * 
	 * @param UserKey The key of the user that owns the resource object.
	 * @param ObjectInstanceKey The key of the object instance to no longer be a service account.
	 * @exception Exception
	 */
	public final void unsetAsServiceAccount(long UserKey, long ObjectInstanceKey) throws Exception {
		resObjectUtils.unsetAsServiceAccount(UserKey, ObjectInstanceKey);
	}
	
	/**
	 * Converts a service account back to a regular resource instance.
	 * 
	 * @param OwnerUsername The username of the user that owns the resource object.
	 * @param DestinationUsername The username of the user that should get the resource object.
	 * @param ObjectInstanceKey The key of the object instance to no longer be a service account.
	 * @exception Exception
	 */
	public final void transferServiceAccount(String OwnerUsername, String DestinationUsername, long ObjectInstanceKey) throws Exception {
		resObjectUtils.transferServiceAccount(getOimUser(OwnerUsername), getOimUser(DestinationUsername), ObjectInstanceKey);
	}
	
	/**
	 * Converts a service account back to a regular resource instance.
	 * 
	 * @param OwnerUsername The username of the user that owns the resource object.
	 * @param DestinationUserKey The key of the user that should get the resource object.
	 * @param ObjectInstanceKey The key of the object instance to no longer be a service account.
	 * @exception Exception
	 */
	public final void transferServiceAccount(String OwnerUsername, long DestinationUserKey, long ObjectInstanceKey) throws Exception {
		resObjectUtils.transferServiceAccount(getOimUser(OwnerUsername), DestinationUserKey, ObjectInstanceKey);
	}
	
	/**
	 * Converts a service account back to a regular resource instance.
	 * 
	 * @param OwnerUserKey The key of the user that owns the resource object.
	 * @param DestinationUsername The username of the user that should get the resource object.
	 * @param ObjectInstanceKey The key of the object instance to no longer be a service account.
	 * @exception Exception
	 */
	public final void transferServiceAccount(long OwnerUserKey, String DestinationUsername, long ObjectInstanceKey) throws Exception {
		resObjectUtils.transferServiceAccount(OwnerUserKey, getOimUser(DestinationUsername), ObjectInstanceKey);
	}
	
	/**
	 * Converts a service account back to a regular resource instance.
	 * 
	 * @param OwnerUserKey The key of the user that owns the resource object.
	 * @param DestinationUserKey The key of the user that should get the resource object.
	 * @param ObjectInstanceKey The key of the object instance to no longer be a service account.
	 * @exception Exception
	 */
	public final void transferServiceAccount(long OwnerUserKey, long DestinationUserKey, long ObjectInstanceKey) throws Exception {
		resObjectUtils.transferServiceAccount(OwnerUserKey, DestinationUserKey, ObjectInstanceKey);
	}

	/**
	 * Creates a new OIM group.
	 *
	 * @param Name The name of the group to create.
	 * @exception Exception
	 */
	public final void createOimGroup(String Name) throws Exception {
		groupUtils.createGroup(Name);
	}

	/**
	 * Deletes an OIM group.
	 *
	 * @param Name The name of the group instance to delete.
	 * @exception Exception
	 */
	public final void removeOimGroup(String Name) throws Exception {
		groupUtils.removeGroup(getOimGroup(Name));
	}

	/**
	 * Deletes an OIM group.
	 *
	 * @param GroupKey The key of the group instance to delete.
	 * @exception Exception
	 */
	public final void removeOimGroup(long GroupKey) throws Exception {
		groupUtils.removeGroup(GroupKey);
	}

	/**
	 * Gets the instance key for a group, or 0 if the group is not found.
	 *
	 * @param Name The name of the group to get the instance key for.
	 * @return The instance key of the group, or 0 if the group is not found.
	 * @exception Exception
	 */
	public final long getOimGroup(String Name) throws Exception {
		return groupUtils.getGroup(Name);
	}

	/**
	 * Gets the name of the group, or en empty string if the group is not found.
	 *
	 * @param Key The instance key of the group to find.
	 * @return The name of the group, or en empty string if the group is not found.
	 * @exception Exception
	 */
	public final String getOimGroup(long Key) throws Exception {
		return groupUtils.getGroup(Key);
	}

	/**
	 * Gets an array instance keys for matching groups.
	 *
	 * @param Attribute The name of the attribute to search by.
	 * @param Value The value of the attribute to search by.
	 * @return An array instance keys for matching groups.
	 * @exception Exception
	 */
	public final long[] findOimGroups(String Attribute, String Value) throws Exception {
		return groupUtils.findGroups(Attribute, Value);
	}

	/**
	 * Gets a Map of group names and instance keys for matching groups.
	 *
	 * @param Attribute The name of the attribute to search by.
	 * @param Value The value of the attribute to search by.
	 * @return A Map of group names and instance keys for matching groups.
	 * @exception Exception
	 */
	public final Map findOimGroupsDetailed(String Attribute, String Value) throws Exception {
		return groupUtils.findGroupsDetailed(Attribute, Value, "Groups.Group Name");
	}
	
	/**
	 * Gets a Map of destination attribute values and instance keys for matching groups.
	 *
	 * @param SearchAttribute The name of the attribute to search by.
	 * @param Value The value of the attribute to search by.
	 * @param DestinationAttribute The name of the attribute to store in the result map.
	 * @return A Map of destination attribute values and instance keys for matching groups.
	 * @exception Exception
	 */
	public final Map findOimGroupsDetailed(String SearchAttribute, String Value, String DestinationAttribute) throws Exception {
		return groupUtils.findGroupsDetailed(SearchAttribute, Value, DestinationAttribute);
	}
	
	/**
	 * Gets a Map of destination attribute values and instance keys for matching groups.
	 *
	 * @param SqlFilter The an SQL filter to use when searching for groups.
	 * @param DestinationAttribute The name of the attribute to store in the result map.
	 * @return A Map of destination attribute values and instance keys for matching groups.
	 * @exception Exception
	 */
	public final Map findOimGroupsFiltered(String SqlFilter, String DestinationAttribute) throws Exception {
		return groupUtils.findGroupsFiltered(SqlFilter, DestinationAttribute);
	}

	/**
	 * Gets the value of the specified field for a group.
	 *
	 * @param Name The name of the group to get the value for.
	 * @param Field The name of the field to retrieve a value for.
	 * @return The value of the field for the specified group, or an empty string if
	 *         the value is not found.
	 * @exception Exception
	 */
	public final String getOimGroupAttribute(String Name, String Field) throws Exception {
		return groupUtils.getGroupAttribute(getOimGroup(Name), Field);
	}

	/**
	 * Gets the value of the specified field for a group.
	 *
	 * @param GroupKey The key of the group to get the value for.
	 * @param Field The name of the field to retrieve a value for.
	 * @return The value of the field for the specified group, or an empty string if
	 *         the value is not found.
	 * @exception Exception
	 */
	public final String getOimGroupAttribute(long GroupKey, String Field) throws Exception {
		return groupUtils.getGroupAttribute(GroupKey, Field);
	}

	/**
	 * Sets the value of the specified field for a group.
	 *
	 * @param Name The name of the group to get the value for.
	 * @param Field The name of the field to set a value for.
	 * @param Value The value to set for the sepcified field.
	 * @exception Exception
	 */
	public final void setOimGroupAttribute(String Name, String Field, String Value) throws Exception {
		groupUtils.setGroupAttribute(getOimGroup(Name), Field, Value);
	}

	/**
	 * Sets the value of the specified field for a group.
	 *
	 * @param GroupKey The key of the group to get the value for.
	 * @param Field The name of the field to set a value for.
	 * @param Value The value to set for the sepcified field.
	 * @exception Exception
	 */
	public final void setOimGroupAttribute(long GroupKey, String Field, String Value) throws Exception {
		groupUtils.setGroupAttribute(GroupKey, Field, Value);
	}

	/**
	 * Gets an array of Maps containing data for all groups on the system.
	 *
	 * @return A Array of Map's containing the attribute value pairs for the resulting object.
	 * @exception Exception
	 */
	public final Map[] getAllOimGroups() throws Exception {
		return groupUtils.getAllGroups();
	}

	/**
	 * Adds an OIM user to an OIM group.
	 *
	 * @param Username The username of the user to add to the group.
	 * @param Group The name of the group to add the user to.
	 * @exception Exception
	 */
	public final void addOimUserToOimGroup(String Username, String Group) throws Exception {
		groupUtils.addUserToGroup(getOimUser(Username), getOimGroup(Group));
	}

	/**
	 * Adds an OIM user to an OIM group.
	 *
	 * @param UserKey The key of the user to add to the group.
	 * @param Group The name of the group to add the user to.
	 * @exception Exception
	 */
	public final void addOimUserToOimGroup(long UserKey, String Group) throws Exception {
		groupUtils.addUserToGroup(UserKey, getOimGroup(Group));
	}

	/**
	 * Adds an OIM user to an OIM group.
	 *
	 * @param Username The username of the user to add to the group.
	 * @param GroupKey The key of the group to add the user to.
	 * @exception Exception
	 */
	public final void addOimUserToOimGroup(String Username, long GroupKey) throws Exception {
		groupUtils.addUserToGroup(getOimUser(Username), GroupKey);
	}

	/**
	 * Adds an OIM user to an OIM group.
	 *
	 * @param UserKey The key of the user to add to the group.
	 * @param GroupKey The key of the group to add the user to.
	 * @exception Exception
	 */
	public final void addOimUserToOimGroup(long UserKey, long GroupKey) throws Exception {
		groupUtils.addUserToGroup(UserKey, GroupKey);
	}

	/**
	 * Removes an OIM user from an OIM group.
	 *
	 * @param Username The username of the user to remove from the group.
	 * @param Group The name of the group to remove the user from.
	 * @exception Exception
	 */
	public final void removeOimUserFromOimGroup(String Username, String Group) throws Exception {
		groupUtils.removeUserFromGroup(getOimUser(Username), getOimGroup(Group), new OIMPolicyFlagChecker(this));
	}

	/**
	 * Removes an OIM user from an OIM group.
	 *
	 * @param UserKey The key of the user to remove from the group.
	 * @param Group The name of the group to remove the user from.
	 * @exception Exception
	 */
	public final void removeOimUserFromOimGroup(long UserKey, String Group) throws Exception {
		groupUtils.removeUserFromGroup(UserKey, getOimGroup(Group), new OIMPolicyFlagChecker(this));
	}

	/**
	 * Removes an OIM user from an OIM group.
	 *
	 * @param Username The username of the user to remove from the group.
	 * @param GroupKey The name of the group to remove the user from.
	 * @exception Exception
	 */
	public final void removeOimUserFromOimGroup(String Username, long GroupKey) throws Exception {
		groupUtils.removeUserFromGroup(getOimUser(Username), GroupKey, new OIMPolicyFlagChecker(this));
	}

	/**
	 * Removes an OIM user from an OIM group.
	 *
	 * @param UserKey The key of the user to remove from the group.
	 * @param GroupKey The key of the group to remove the user from.
	 * @exception Exception
	 */
	public final void removeOimUserFromOimGroup(long UserKey, long GroupKey) throws Exception {
		groupUtils.removeUserFromGroup(UserKey, GroupKey, new OIMPolicyFlagChecker(this));
	}

	/**
	 * Tests whether a user is a member of a group or not.
	 *
	 * @param Username The username of the user to test membership for.
	 * @param Group The name of the group to test membership for.
	 * @return <code>true</code> if the user is a member of group, or <code>false</code>
	 *         if the user is not a member of the group.
	 * @exception Exception
	 */
	public final boolean isOimGroupMember(String Username, String Group) throws Exception {
		return groupUtils.isGroupMember(getOimUser(Username), getOimGroup(Group));
	}

	/**
	 * Tests whether a user is a member of a group or not.
	 *
	 * @param Username The username of the user to test membership for.
	 * @param GroupKey The key of the group to test membership for.
	 * @return <code>true</code> if the user is a member of group, or <code>false</code>
	 *         if the user is not a member of the group.
	 * @exception Exception
	 */
	public final boolean isOimGroupMember(String Username, long GroupKey) throws Exception {
		return groupUtils.isGroupMember(getOimUser(Username), GroupKey);
	}

	/**
	 * Tests whether a user is a member of a group or not.
	 *
	 * @param UserKey The key of the user to test membership for.
	 * @param Group The name of the group to test membership for.
	 * @return <code>true</code> if the user is a member of group, or <code>false</code>
	 *         if the user is not a member of the group.
	 * @exception Exception
	 */
	public final boolean isOimGroupMember(long UserKey, String Group) throws Exception {
		return groupUtils.isGroupMember(UserKey, getOimGroup(Group));
	}

	/**
	 * Tests whether a user is a member of a group or not.
	 *
	 * @param UserKey The key of the user to test membership for.
	 * @param GroupKey The key of the group to test membership for.
	 * @return <code>true</code> if the user is a member of group, or <code>false</code>
	 *         if the user is not a member of the group.
	 * @exception Exception
	 */
	public final boolean isOimGroupMember(long UserKey, long GroupKey) throws Exception {
		return groupUtils.isGroupMember(UserKey, GroupKey);
	}

	/**
	 * Returns an array of user keys for all users that are a member of a group.
	 *
	 * @param Group The name of the group to get membership for.
	 * @return An Array of longs for the key of each user that is a member of this group.
	 * @exception Exception
	 */
	public final long[] getOimGroupMembers(String Group) throws Exception {
		return groupUtils.getGroupMembers(getOimGroup(Group));
	}

	/**
	 * Returns an array of user keys for all users that are a member of a group.
	 *
	 * @param GroupKey The key of the group to get membership for.
	 * @return An Array of longs for the key of each user that is a member of this group.
	 * @exception Exception
	 */
	public final long[] getOimGroupMembers(long GroupKey) throws Exception {
		return groupUtils.getGroupMembers(GroupKey);
	}

	/**
	 * Finds the menu item key for a given menu item description.  Returns 0 if the menu item is
	 * not found.
	 *
	 * @param Description The description of the menu item to find.
	 * @return The key of the menu item, or 0 if the menu item is not found.
	 * @exception Exception
	 */
	public final long getMenuItem(String Description) throws Exception {
		return groupUtils.getMenuItem(Description);
	}

	/**
	 * Assigns a menu item to a group.
	 *
	 * @param Group The name of the group to assign the menu item to.
	 * @param MenuItem The key of the menu item to assign to the group.
	 * @exception Exception
	 */
	public final void addMenuItemToOimGroup(String Group, String MenuItem) throws Exception {
		groupUtils.addMenuItemToGroup(getOimGroup(Group), getMenuItem(MenuItem));
	}

	/**
	 * Assigns a menu item to a group.
	 *
	 * @param Group The name of the group to assign the menu item to.
	 * @param MenuItemKey The key of the menu item to assign to the group.
	 * @exception Exception
	 */
	public final void addMenuItemToOimGroup(String Group, long MenuItemKey) throws Exception {
		groupUtils.addMenuItemToGroup(getOimGroup(Group), MenuItemKey);
	}

	/**
	 * Assigns a menu item to a group.
	 *
	 * @param GroupKey The key of the group to assign the menu item to.
	 * @param MenuItem The description of the menu item to assign to the group.
	 * @exception Exception
	 */
	public final void addMenuItemToOimGroup(long GroupKey, String MenuItem) throws Exception {
		groupUtils.addMenuItemToGroup(GroupKey, getMenuItem(MenuItem));
	}

	/**
	 * Assigns a menu item to a group.
	 *
	 * @param GroupKey The key of the group to assign the menu item to.
	 * @param MenuItemKey The key of the menu item to assign to the group.
	 * @exception Exception
	 */
	public final void addMenuItemToOimGroup(long GroupKey, long MenuItemKey) throws Exception {
		groupUtils.addMenuItemToGroup(GroupKey, MenuItemKey);
	}

	/**
	 * Removes a menu item to a group.
	 *
	 * @param Group The name of the group to remove the menu item from.
	 * @param MenuItem The description of the menu item to remove from the group.
	 * @exception Exception
	 */
	public final void removeMenuItemFromOimGroup(String Group, String MenuItem) throws Exception {
		groupUtils.removeMenuItemFromGroup(getOimGroup(Group), getMenuItem(MenuItem));
	}

	/**
	 * Removes a menu item to a group.
	 *
	 * @param Group The name of the group to remove the menu item from.
	 * @param MenuItemKey The key of the menu item to remove from the group.
	 * @exception Exception
	 */
	public final void removeMenuItemFromOimGroup(String Group, long MenuItemKey) throws Exception {
		groupUtils.removeMenuItemFromGroup(getOimGroup(Group), MenuItemKey);
	}

	/**
	 * Removes a menu item to a group.
	 *
	 * @param GroupKey The key of the group to remove the menu item from.
	 * @param MenuItem The description of the menu item to remove from the group.
	 * @exception Exception
	 */
	public final void removeMenuItemFromOimGroup(long GroupKey, String MenuItem) throws Exception {
		groupUtils.removeMenuItemFromGroup(GroupKey, getMenuItem(MenuItem));
	}

	/**
	 * Removes a menu item to a group.
	 *
	 * @param GroupKey The key of the group to remove the menu item from.
	 * @param MenuItemKey The key of the menu item to remove from the group.
	 * @exception Exception
	 */
	public final void removeMenuItemFromOimGroup(long GroupKey, long MenuItemKey) throws Exception {
		groupUtils.removeMenuItemFromGroup(GroupKey, MenuItemKey);
	}

	/**
	 * Adds a group as an administrator of another group.
	 *
	 * @param Group The name of the group object to add the administrative group to.
	 * @param AdminGroup The name of the administrator group object to add.
	 * @param CanWrite <code>true</code> if the administrator group should be allowed to write to the group object,
	 *                 or <code>false</code> if the administrator group should not be allowed to write to the group object.
	 * @param CanDelete <code>true</code> if the administrator group should be allowed to delete the group object,
	 *                 or <code>false</code> if the administrator group should not be allowed to delete the group object.
	 * @exception Exception
	 */
	public final void addAdministratorToGroup(String Group, String AdminGroup, boolean CanWrite, boolean CanDelete) throws Exception {
		groupUtils.addAdministratorToGroup(getOimGroup(Group), getOimGroup(AdminGroup), CanWrite, CanDelete);
	}

	/**
	 * Adds a group as an administrator of another group.
	 *
	 * @param Group The name of the group object to add the administrative group to.
	 * @param AdminGroupKey The key of the administrator group object to add.
	 * @param CanWrite <code>true</code> if the administrator group should be allowed to write to the group object,
	 *                 or <code>false</code> if the administrator group should not be allowed to write to the group object.
	 * @param CanDelete <code>true</code> if the administrator group should be allowed to delete the group object,
	 *                 or <code>false</code> if the administrator group should not be allowed to delete the group object.
	 * @exception Exception
	 */
	public final void addAdministratorToGroup(String Group, long AdminGroupKey, boolean CanWrite, boolean CanDelete) throws Exception {
		groupUtils.addAdministratorToGroup(getOimGroup(Group), AdminGroupKey, CanWrite, CanDelete);
	}

	/**
	 * Adds a group as an administrator of another group.
	 *
	 * @param GroupKey The key of the group object to add the administrative group to.
	 * @param AdminGroup The name of the administrator group object to add.
	 * @param CanWrite <code>true</code> if the administrator group should be allowed to write to the group object,
	 *                 or <code>false</code> if the administrator group should not be allowed to write to the group object.
	 * @param CanDelete <code>true</code> if the administrator group should be allowed to delete the group object,
	 *                 or <code>false</code> if the administrator group should not be allowed to delete the group object.
	 * @exception Exception
	 */
	public final void addAdministratorToGroup(long GroupKey, String AdminGroup, boolean CanWrite, boolean CanDelete) throws Exception {
		groupUtils.addAdministratorToGroup(GroupKey, getOimGroup(AdminGroup), CanWrite, CanDelete);
	}

	/**
	 * Adds a group as an administrator of another group.
	 *
	 * @param GroupKey The key of the group object to add the administrative group to.
	 * @param AdminGroupKey The key of the administrator group object to add.
	 * @param CanWrite <code>true</code> if the administrator group should be allowed to write to the group object,
	 *                 or <code>false</code> if the administrator group should not be allowed to write to the group object.
	 * @param CanDelete <code>true</code> if the administrator group should be allowed to delete the group object,
	 *                 or <code>false</code> if the administrator group should not be allowed to delete the group object.
	 * @exception Exception
	 */
	public final void addAdministratorToGroup(long GroupKey, long AdminGroupKey, boolean CanWrite, boolean CanDelete) throws Exception {
		groupUtils.addAdministratorToGroup(GroupKey, AdminGroupKey, CanWrite, CanDelete);
	}

	/**
	 * Removes a group as an administrator of another group.
	 *
	 * @param Group The name of the group object to remove the administrative group from.
	 * @param AdminGroup The name of the administrator group object to remove.
	 * @exception Exception
	 */
	public final void removeAdministratorFromGroup(String Group, String AdminGroup) throws Exception {
		groupUtils.removeAdministratorFromGroup(getOimGroup(Group), getOimGroup(AdminGroup));
	}

	/**
	 * Removes a group as an administrator of another group.
	 *
	 * @param Group The name of the group object to remove the administrative group from.
	 * @param AdminGroupKey The key of the administrator group object to remove.
	 * @exception Exception
	 */
	public final void removeAdministratorFromGroup(String Group, long AdminGroupKey) throws Exception {
		groupUtils.removeAdministratorFromGroup(getOimGroup(Group), AdminGroupKey);
	}

	/**
	 * Removes a group as an administrator of another group.
	 *
	 * @param GroupKey The key of the group object to remove the administrative group from.
	 * @param AdminGroup The name of the administrator group object to remove.
	 * @exception Exception
	 */
	public final void removeAdministratorFromGroup(long GroupKey, String AdminGroup) throws Exception {
		groupUtils.removeAdministratorFromGroup(GroupKey, getOimGroup(AdminGroup));
	}

	/**
	 * Removes a group as an administrator of another group.
	 *
	 * @param GroupKey The key of the group object to remove the administrative group from.
	 * @param AdminGroupKey The key of the administrator group object to remove.
	 * @exception Exception
	 */
	public final void removeAdministratorFromGroup(long GroupKey, long AdminGroupKey) throws Exception {
		groupUtils.removeAdministratorFromGroup(GroupKey, AdminGroupKey);
	}
	
	/**
	 * Links a membership rule to a group.
	 * 
	 * @param Group The name of the group to operate on.
	 * @param RuleName The name of the rule to link to a group.
	 * @exception Exception
	 */
	public final void addMembershipRuleToGroup(String Group, String RuleName) throws Exception {
		groupUtils.addMembershipRule(getOimGroup(Group), RuleName);
	}
	
	/**
	 * Links a membership rule to a group.
	 * 
	 * @param GroupKey The key of the group to operate on.
	 * @param RuleName The name of the rule to link to a group.
	 * @exception Exception
	 */
	public final void addMembershipRuleToGroup(long GroupKey, String RuleName) throws Exception {
		groupUtils.addMembershipRule(GroupKey, RuleName);
	}
	
	/**
	 * Unlinks a membership rule to a group.
	 * 
	 * @param Group The name of the group to operate on.
	 * @param RuleName The name of the rule to unlink from a group.
	 * @exception Exception
	 */
	public final void removeMembershipRule(String Group, String RuleName) throws Exception {
		groupUtils.removeMembershipRule(getOimGroup(Group), RuleName);
	}
	
	/**
	 * Unlinks a membership rule to a group.
	 * 
	 * @param GroupKey The key of the group to operate on.
	 * @param RuleName The name of the rule to unlink from a group.
	 * @exception Exception
	 */
	public final void removeMembershipRule(long GroupKey, String RuleName) throws Exception {
		groupUtils.removeMembershipRule(GroupKey, RuleName);
	}
	
	/**
	 * Gets all membership rules linked to a group.
	 * 
	 * @param Group The name of the group to get the rules for.
	 * @return An array of all the rule names linked to a group.
	 * @exception Exception
	 */
	public final String[] getMembershipRoles(String Group) throws Exception {
		return groupUtils.getMembershipRoles(getOimGroup(Group));
	}
	
	/**
	 * Gets all membership rules linked to a group.
	 * 
	 * @param GroupKey The key of the group to get the rules for.
	 * @return An array of all the rule names linked to a group.
	 * @exception Exception
	 */
	public final String[] getMembershipRoles(long GroupKey) throws Exception {
		return groupUtils.getMembershipRoles(GroupKey);
	}
	
	/**
	 * Gets all membership rules not currently linked to a group.
	 * 
	 * @param Group The name of the group to get the rules not linked for.
	 * @return An array of all the rule names not linked to a group.
	 * @exception Exception
	 */
	public final String[] getAvailableMembershipRoles(String Group) throws Exception {
		return groupUtils.getAvailableMembershipRoles(getOimGroup(Group));
	}
	
	/**
	 * Gets all membership rules not currently linked to a group.
	 * 
	 * @param GroupKey The key of the group to get the rules not linked for.
	 * @return An array of all the rule names not linked to a group.
	 * @exception Exception
	 */
	public final String[] getAvailableMembershipRoles(long GroupKey) throws Exception {
		return groupUtils.getAvailableMembershipRoles(GroupKey);
	}
	
	/**
	 * Evaluates a group membership rule without actually adding or removing a user
	 * to a group.
	 * 
	 * @param UserData A Map of the user data of the user to evaluate.
	 * @param Group The name of the group to check the membership rules for.
	 * @return <code>true</code> if the user should be a member of the group based on the 
	 *         rules, or <code>false</code> if the user should not be a member of the group.
	 * @exception Exception
	 */
	public final boolean evaluateMembershipRule(Map UserData, String Group) throws Exception {
		return groupUtils.evaluateMembershipRule(UserData, getOimGroup(Group));
	}
	
	/**
	 * Evaluates a group membership rule without actually adding or removing a user
	 * to a group.
	 * 
	 * @param UserData A Map of the user data of the user to evaluate.
	 * @param GroupKey The key of group to check the membership rules for.
	 * @return <code>true</code> if the user should be a member of the group based on the 
	 *         rules, or <code>false</code> if the user should not be a member of the group.
	 * @exception Exception
	 */
	public final boolean evaluateMembershipRule(Map UserData, long GroupKey) throws Exception {
		return groupUtils.evaluateMembershipRule(UserData, GroupKey);
	}

	/**
	 * Gets a Map of the process form attributes and values. An empty Map is returned if the process
	 * instance is not found.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @return A Map of attributes and values for the form, or an empty Map if the process instance is
	 *         not found.
	 * @exception Exception
	 */
	public final Map getProcessFormValues(long ProcessInstanceKey) throws Exception {
		return formUtils.getProcessFormValues(ProcessInstanceKey, false, "yyyy-MM-dd");
	}

	/**
	 * Gets a Map of the process form attributes and values. An empty Map is returned if the process
	 * instance is not found.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param HideEncrypted <code>true</code> will mask out any encrypted values from the result set,
	 *                      and <code>false</code> will allow the encypted values to pass through.
	 * @return A Map of attributes and values for the form, or an empty Map if the process instance is
	 *         not found.
	 * @exception Exception
	 */
	public final Map getProcessFormValues(long ProcessInstanceKey, boolean HideEncrypted) throws Exception {
		return formUtils.getProcessFormValues(ProcessInstanceKey, HideEncrypted, "yyyy-MM-dd");
	}
	
	/**
	 * Gets a Map of the process form attributes and values. An empty Map is returned if the process
	 * instance is not found.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param HideEncrypted <code>true</code> will mask out any encrypted values from the result set,
	 *                      and <code>false</code> will allow the encypted values to pass through.
	 * @param DateFormat The format string used for any dates present in the process data.
	 * @return A Map of attributes and values for the form, or an empty Map if the process instance is
	 *         not found.
	 * @exception Exception
	 */
	public final Map getProcessFormValues(long ProcessInstanceKey, boolean HideEncrypted, String DateFormat) throws Exception {
		return formUtils.getProcessFormValues(ProcessInstanceKey, HideEncrypted, DateFormat);
	}

	/**
	 * Gets a specific value from the process form, or an empty string if the process instance or
	 * attribute is not found.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param Attribute The name of the attribute to get.
	 * @return A the value of an attribute form the form, or an empty String if the process instance 
	 *         or attribute is not found.
	 * @exception Exception
	 */
	public final String getProcessFormValue(long ProcessInstanceKey, String Attribute) throws Exception {
		return formUtils.getProcessFormValue(ProcessInstanceKey, Attribute, false, null);
	}

	/**
	 * Gets a specific value from the process form, or an empty string if the process instance or
	 * attribute is not found.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param Attribute The name of the attribute to get.
	 * @param HideEncrypted <code>true</code> will mask out any encrypted values from the result set,
	 *                      and <code>false</code> will allow the encypted values to pass through.
	 * @return A the value of an attribute form the form, or an empty String if the process instance 
	 *         or attribute is not found.
	 * @exception Exception
	 */
	public final String getProcessFormValue(long ProcessInstanceKey, String Attribute, boolean HideEncrypted) throws Exception {
		return formUtils.getProcessFormValue(ProcessInstanceKey, Attribute, HideEncrypted, null);
	}

	/**
	 * Gets a specific value from the process form, or an empty string if the process instance or
	 * attribute is not found.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param Attribute The name of the attribute to get.
	 * @param HideEncrypted <code>true</code> will mask out any encrypted values from the result set,
	 *                      and <code>false</code> will allow the encypted values to pass through.
	 * @param DateFormat The format string used for any dates present in the process data.
	 * @return A the value of an attribute form the form, or an empty String if the process instance 
	 *         or attribute is not found.
	 * @exception Exception
	 */
	public final String getProcessFormValue(long ProcessInstanceKey, String Attribute, boolean HideEncrypted, String DateFormat) throws Exception {
		return formUtils.getProcessFormValue(ProcessInstanceKey, Attribute, HideEncrypted, DateFormat);
	}

	/**
	 * Sets a specific value on the process form.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param Attribute The name of the attribute to set.
	 * @param Value The value of the attribute to set.
	 * @exception Exception
	 */
	public final void setProcessFormValue(long ProcessInstanceKey, String Attribute, String Value) throws Exception {
		formUtils.setProcessFormValue(ProcessInstanceKey, Attribute, Value);
	}
	
	/**
	 * Sets a specific value on the process form.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param Attribute The name of the attribute to set.
	 * @param Value The value of the attribute to set.
	 * @exception Exception
	 */
	public final void setProcessFormValue(long ProcessInstanceKey, String Attribute, java.util.Date Value) throws Exception {
		formUtils.setProcessFormValue(ProcessInstanceKey, Attribute, Value);
	}

	/**
	 * Sets a multiple values on the process form.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param Data A Map containing the values to set.
	 * @exception Exception
	 */
	public final void setProcessFormValues(long ProcessInstanceKey, Map Data) throws Exception {
		formUtils.setProcessFormValues(ProcessInstanceKey, Data);
	}

	/**
	 * Executes the prepop adapters for a given form and returns the resulting data in a Map of 
	 * attributes and values.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @return A Map with the data resulting from the executing of the prepopulate adapters.
	 * @exception Exception
	 */
	public final Map getPrepopData(long ProcessInstanceKey) throws Exception {
		return formUtils.getPrepopData(ProcessInstanceKey);
	}
	
	

	/**
	 * Executes the prepop adapters for a given form and returns the resulting data in a Map of 
	 * attributes and values.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param DateFormat The format string used for any dates present in the process data.
	 * @return A Map with the data resulting from the executing of the prepopulate adapters.
	 * @exception Exception
	 */
	public final Map getPrepopData(long ProcessInstanceKey, String dateFormat) throws Exception {
		return formUtils.getPrepopData(ProcessInstanceKey,dateFormat);
	}
	
	/**
	 * Gets an Array of Maps of the process form attributes and values. An empty Array is returned if the child 
	 * data is not present.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param ChildTable The name of the child table to retrieve data for.
	 * @return An Array of Maps of attributes and values for the form, or an empty Array if the child data is
	 *         not present.
	 * @exception Exception
	 */
	public final Map[] getProcessFormChildValues(long ProcessInstanceKey, String ChildTable) throws Exception {
		return formUtils.getProcessFormChildValues(ProcessInstanceKey, ChildTable, false, null);
	}

	/**
	 * Gets an Array of Maps of the process form attributes and values. An empty Array is returned if the child 
	 * data is not present.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param ChildTable The name of the child table to retrieve data for.
	 * @param HideEncrypted <code>true</code> will mask out any encrypted values from the result set,
	 *                      and <code>false</code> will allow the encypted values to pass through.
	 * @return An Array of Maps of attributes and values for the form, or an empty Array if the child data is
	 *         not present.
	 * @exception Exception
	 */
	public final Map[] getProcessFormChildValues(long ProcessInstanceKey, String ChildTable, boolean HideEncrypted) throws Exception {
		return formUtils.getProcessFormChildValues(ProcessInstanceKey, ChildTable, HideEncrypted, null);
	}

	/**
	 * Gets an Array of Maps of the process form attributes and values. An empty Array is returned if the child 
	 * data is not present.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param ChildTable The name of the child table to retrieve data for.
	 * @param HideEncrypted <code>true</code> will mask out any encrypted values from the result set,
	 *                      and <code>false</code> will allow the encypted values to pass through.
	 * @param DateFormat The format string used for any dates present in the process data.
	 * @return An Array of Maps of attributes and values for the form, or an empty Array if the child data is
	 *         not present.
	 * @exception Exception
	 */
	public final Map[] getProcessFormChildValues(long ProcessInstanceKey, String ChildTable, boolean HideEncrypted, String DateFormat) throws Exception {
		return formUtils.getProcessFormChildValues(ProcessInstanceKey, ChildTable, HideEncrypted, DateFormat);
	}

	/**
	 * Retrieves the child data primary key from a child data entry.
	 *
	 * @param ChildTable The name of the child table to retrieve data for.
	 * @param Data The Map of attributes and values for the child data entry.
	 * @return The key of the child data, or 0 if the key is not found.
	 * @exception Exception
	 */
	public final long getProcessFormChildValueKey(String ChildTable, Map Data) throws Exception {
		return formUtils.getProcessFormChildValueKey(ChildTable, Data);
	}

	/**
	 * Gets an array of child table names for a given process instance.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @return An array of child table names for the specified process instance, or an empty
	 *         array if no child tables exists for that process instance.
	 * @exception Exception
	 */
	public final String[] getChildTables(long ProcessInstanceKey) throws Exception {
		return formUtils.getChildTables(ProcessInstanceKey);
	}

	/**
	 * Adds a new child data entry.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param ChildTable The name of the child table to retrieve data for.
	 * @param Data The Map of attributes and values for the child data entry to add.
	 * @exception Exception
	 */
	public final void addProcessFormChildValue(long ProcessInstanceKey, String ChildTable, Map Data) throws Exception {
		formUtils.addProcessFormChildValue(ProcessInstanceKey, ChildTable, Data);
	}

	/**
	 * Updates an existing child data entry.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param ChildTable The name of the child table to retrieve data for.
	 * @param ChildDataKey The primary of the child data entry to update.
	 * @param Data The Map of the new attributes and values for the child data entry.
	 * @exception Exception
	 */
	public final void updateProcessFormChildValue(long ProcessInstanceKey, String ChildTable, long ChildDataKey, Map Data) throws Exception {
		formUtils.updateProcessFormChildValue(ProcessInstanceKey, ChildTable, ChildDataKey, Data);
	}

	/**
	 * Updates an existing child data entry.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param ChildTable The name of the child table to retrieve data for.
	 * @param Data The Map of the new attributes and values for the child data entry.
	 * @exception Exception
	 */
	public final void updateProcessFormChildValue(long ProcessInstanceKey, String ChildTable, Map Data) throws Exception {
		long childDataKey = formUtils.getProcessFormChildValueKey(ChildTable, Data);
		formUtils.updateProcessFormChildValue(ProcessInstanceKey, ChildTable, childDataKey, Data);
	}

	/**
	 * Removes an existing child data entry.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param ChildTable The name of the child table to retrieve data for.
	 * @param ChildDataKey The primary of the child data entry to remove.
	 * @exception Exception
	 */
	public final void removeProcessDataChildValue(long ProcessInstanceKey, String ChildTable, long ChildDataKey) throws Exception {
		formUtils.removeProcessDataChildValue(ProcessInstanceKey, ChildTable, ChildDataKey);
	}

	/**
	 * Removes an existing child data entry.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param ChildTable The name of the child table to retrieve data for.
	 * @param Data The Map of the attributes and values for the child data entry to remove.
	 * @exception Exception
	 */
	public final void removeProcessDataChildValue(long ProcessInstanceKey, String ChildTable, Map Data) throws Exception {
		long childDataKey = formUtils.getProcessFormChildValueKey(ChildTable, Data);
		formUtils.removeProcessDataChildValue(ProcessInstanceKey, ChildTable, childDataKey);
	}

	/**
	 * Determines if a field on a process form contains an IT resource key or a literal value.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param Field The name of the field to determine if the value is an IT resource key or not.
	 * @return <code>true</code> if the field contains an IT resource key, or <code>false</code> if
	 *         the field does not.
	 * @exception Exception
	 */
	public final boolean isITResourceField(long ProcessInstanceKey, String Field) throws Exception {
		return formUtils.isITResourceField(ProcessInstanceKey, Field);
	}

	/**
	 * Determines if a field on a process form contains an IT resource key or a literal value.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param ChildTable The name of the child table that contains the field.
	 * @param Field The name of the field to determine if the value is an IT resource key or not.
	 * @return <code>true</code> if the field contains an IT resource key, or <code>false</code> if
	 *         the field does not.
	 * @exception Exception
	 */
	public final boolean isITResourceField(long ProcessInstanceKey, String ChildTable, String Field) throws Exception {
		return formUtils.isITResourceField(ProcessInstanceKey, ChildTable, Field);
	}

	/**
	 * Determines if a field on a process form contains a password.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param Field The name of the field to determine if the value is an IT resource key or not.
	 * @return <code>true</code> if the field contains an IT resource key, or <code>false</code> if
	 *         the field does not.
	 * @exception Exception
	 */
	public final boolean isPasswordField(long ProcessInstanceKey, String Field) throws Exception {
		return formUtils.isPasswordField(ProcessInstanceKey, Field);
	}

	/**
	 * Determines if a child field on a process form contains a password.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param ChildTable The name of the child table that contains the field.
	 * @param Field The name of the field to determine if the value is an IT resource key or not.
	 * @return <code>true</code> if the field contains an IT resource key, or <code>false</code> if
	 *         the field does not.
	 * @exception Exception
	 */
	public final boolean isPasswordField(long ProcessInstanceKey, String ChildTable, String Field) throws Exception {
		return formUtils.isPasswordField(ProcessInstanceKey, ChildTable, Field);
	}

	/**
	 * Determines if a field on a process form contains an encrypted value.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param Field The name of the field to determine if the value is encrypted or not.
	 * @return <code>true</code> if the field is encrypted, or <code>false</code> if
	 *         the field is not.
	 * @exception Exception
	 */
	public final boolean isEncryptedField(long ProcessInstanceKey, String Field) throws Exception {
		return formUtils.isEncryptedField(ProcessInstanceKey, Field);
	}

	/**
	 * Determines if a field on a process form contains an encrypted value.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param ChildTable The name of the child table that contains the field.
	 * @param Field The name of the field to determine if the value is encrypted or not.
	 * @return <code>true</code> if the field is encrypted, or <code>false</code> if
	 *         the field is not.
	 * @exception Exception
	 */
	public final boolean isEncryptedField(long ProcessInstanceKey, String ChildTable, String Field) throws Exception {
		return formUtils.isEncryptedField(ProcessInstanceKey, ChildTable, Field);
	}
	
	/**
	 * Determines if a field on a process form contains a date or a literal value.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param Field The name of the field to determine if the value is an IT resource key or not.
	 * @return <code>true</code> if the field contains an IT resource key, or <code>false</code> if
	 *         the field does not.
	 * @exception Exception
	 */
	public final boolean isDateField(long ProcessInstanceKey, String Field) throws Exception {
		return formUtils.isDateField(ProcessInstanceKey, Field);
	}

	/**
	 * Determines if a child field on a process form contains a date or a literal value.
	 *
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param ChildTable The name of the child table that contains the field.
	 * @param Field The name of the field to determine if the value is an IT resource key or not.
	 * @return <code>true</code> if the field contains an IT resource key, or <code>false</code> if
	 *         the field does not.
	 * @exception Exception
	 */
	public final boolean isDateField(long ProcessInstanceKey, String ChildTable, String Field) throws Exception {
		return formUtils.isDateField(ProcessInstanceKey, ChildTable, Field);
	}
	
	/**
	 * Gets a Map containing the database column names and display names for a process form.
	 * 
	 * @param ProcessInstanceKey The instance key for the process associated with the form
	 * @return A Map containing attributes values pairs where the key is the database column 
	 *         name for the form, and the value is the corresponding display name.
	 * @throws Exception
	 */
	public final Map getProcessFormDisplayNames(long ProcessInstanceKey) throws Exception {
		return formUtils.getProcessFormDisplayNames(ProcessInstanceKey);
	}
	
	/**
	 * Gets a Map containing the database column names and display names for a process child form.
	 * 
	 * @param ProcessInstanceKey The instance key for the process associated with the form.
	 * @param ChildTable The name of the child table.
	 * @return A Map containing attributes values pairs where the key is the database column 
	 *         name for the form, and the value is the corresponding display name.
	 * @throws Exception
	 */
	public final Map getProcessChildFormDisplayNames(long ProcessInstanceKey, String ChildTable) throws Exception {
		return formUtils.getProcessChildFormDisplayNames(ProcessInstanceKey, ChildTable);
	}

	/**
	 * Retrieves the key for a given email defintion.
	 *
	 * @param Name The name of the email definition to retrieve the key for.
	 * @return The key of the email definition, or 0 if the email definition is not
	 *         found.
	 * @exception Exception
	 */
	public final long getEmailDefinition(String Name) throws Exception {
		return emailUtils.getEmailDefinition(Name);
	}
	
	/**
	 * Retrieves the name for a given email defintion.
	 *
	 * @param Key The key of the email definition to retrieve the name for.
	 * @return The name of the email definition, or an empty string if the email 
	 *         definition is not found.
	 * @exception Exception
	 */
	public final String getEmailDefinition(long Key) throws Exception {
		return emailUtils.getEmailDefinition(Key);
	}

	/**
	 * Retrieves the name of the IT resource used for sending email from OIM.
	 *
	 * @return The name of the IT resource used to send email notices.
	 * @exception Exception
	 */
	public final String getEmailITResource() throws Exception {
		return emailUtils.getEmailITResource();
	}

	/**
	 * Sends an email message.
	 *
	 * @param Subject The subject of the email message to send.
	 * @param Body The body of the email message to send.
	 * @param From The from address to use on the email message.
	 * @param Recipient The recipients for the message.   All recipients will be placed in the 'TO' field.
	 * @exception Exception
	 */
	public final void sendEmail(String Subject, String Body, String From, String Recipient) throws Exception {
		emailUtils.sendEmail(Subject, Body, From, Recipient, getITResData(getEmailITResource()), null);
	}
	
	/**
	 * Sends an email message.
	 *
	 * @param Subject The subject of the email message to send.
	 * @param Body The body of the email message to send.
	 * @param From The from address to use on the email message.
	 * @param Recipients A Map of the recipient types and the type for each.  Valid types include <code>TO</code>,
	 *                   <code>CC</code>, or <code>BCC</code>.
	 * @exception Exception
	 */
	public final void sendEmail(String Subject, String Body, String From, Map Recipients) throws Exception {
		emailUtils.sendEmail(Subject, Body, From, Recipients, getITResData(getEmailITResource()), null);
	}
	
	/**
	 * Sends an email message.
	 *
	 * @param Subject The subject of the email message to send.
	 * @param Body The body of the email message to send.
	 * @param From The from address to use on the email message.
	 * @param Recipient The recipients for the message.   All recipients will be placed in the 'TO' field.
	 * @param MimeType The MIME Type to use for the body.
	 * @exception Exception
	 */
	public final void sendEmail(String Subject, String Body, String From, String Recipient, String MimeType) throws Exception {
		emailUtils.sendEmail(Subject, Body, From, Recipient, getITResData(getEmailITResource()), MimeType);
	}
	
	/**
	 * Sends an email message.
	 *
	 * @param Subject The subject of the email message to send.
	 * @param Body The body of the email message to send.
	 * @param From The from address to use on the email message.
	 * @param Recipients A Map of the recipient types and the type for each.  Valid types include <code>TO</code>,
	 *                   <code>CC</code>, or <code>BCC</code>.
	 * @param MimeType The MIME Type to use for the body.
	 * @exception Exception
	 */
	public final void sendEmail(String Subject, String Body, String From, Map Recipients, String MimeType) throws Exception {
		emailUtils.sendEmail(Subject, Body, From, Recipients, getITResData(getEmailITResource()), MimeType);
	}

	/**
	 * Sends an email based on email definition for a approval request.
	 *
	 * @param EmailDefinition The name of the email definition to use.
	 * @param Recipient The recipient email address of this message.
	 * @param RequestKey The key of the request that sends this email.
	 * @exception Exception
	 */
	public final void sendApprovalEmail(String EmailDefinition, String Recipient, long RequestKey) throws Exception {
		emailUtils.sendApprovalEmail(getEmailDefinition(EmailDefinition), Recipient, getITResData(getEmailITResource()), RequestKey);
	}

	/**
	 * Sends an email based on email definition for a approval request.
	 *
	 * @param EmailDefinitionKey The key of the email definition to use.
	 * @param Recipient The recipient email address of this message.
	 * @param RequestKey The key of the request that sends this email.
	 * @exception Exception
	 */
	public final void sendApprovalEmail(long EmailDefinitionKey, String Recipient, long RequestKey) throws Exception {
		emailUtils.sendApprovalEmail(EmailDefinitionKey, Recipient, getITResData(getEmailITResource()), RequestKey);
	}
	
	/**
	 * Sends an email based on email definition for a approval request.
	 *
	 * @param EmailDefinition The name of the email definition to use.
	 * @param Recipients A Map of the recipient types and the type for each.  Valid types include <code>TO</code>,
	 *                   <code>CC</code>, or <code>BCC</code>.
	 * @param RequestKey The key of the request that sends this email.
	 * @exception Exception
	 */
	public final void sendApprovalEmail(String EmailDefinition, Map Recipients, long RequestKey) throws Exception {
		emailUtils.sendApprovalEmail(getEmailDefinition(EmailDefinition), Recipients, getITResData(getEmailITResource()), RequestKey);
	}

	/**
	 * Sends an email based on email definition for a approval request.
	 *
	 * @param EmailDefinitionKey The key of the email definition to use.
	 * @param Recipients A Map of the recipient types and the type for each.  Valid types include <code>TO</code>,
	 *                   <code>CC</code>, or <code>BCC</code>.
	 * @param RequestKey The key of the request that sends this email.
	 * @exception Exception
	 */
	public final void sendApprovalEmail(long EmailDefinitionKey, Map Recipients, long RequestKey) throws Exception {
		emailUtils.sendApprovalEmail(EmailDefinitionKey, Recipients, getITResData(getEmailITResource()), RequestKey);
	}

	/**
	 * Sends an email based on email definition for a provisioning task.
	 *
	 * @param EmailDefinition The name of the email definition to use.
	 * @param Recipient The recipient email address of this message.
	 * @param TaskInstanceKey The key of the process task instance that sends this email.
	 * @exception Exception
	 */
	public final void sendProvisioningEmail(String EmailDefinition, String Recipient, long TaskInstanceKey) throws Exception {
		emailUtils.sendProvisioningEmail(getEmailDefinition(EmailDefinition), Recipient, getITResData(getEmailITResource()), TaskInstanceKey);
	}

	/**
	 * Sends an email based on email definition for a provisioning task.
	 *
	 * @param EmailDefinitionKey The key of the email definition to use.
	 * @param Recipient The recipient email address of this message.
	 * @param TaskInstanceKey The key of the process task instance that sends this email.
	 * @exception Exception
	 */
	public final void sendProvisioningEmail(long EmailDefinitionKey, String Recipient, long TaskInstanceKey) throws Exception {
		emailUtils.sendProvisioningEmail(EmailDefinitionKey, Recipient, getITResData(getEmailITResource()), TaskInstanceKey);
	}
	
	/**
	 * Sends an email based on email definition for a provisioning task.
	 *
	 * @param EmailDefinition The name of the email definition to use.
	 * @param Recipients A Map of the recipient types and the type for each.  Valid types include <code>TO</code>,
	 *                   <code>CC</code>, or <code>BCC</code>.
	 * @param TaskInstanceKey The key of the process task instance that sends this email.
	 * @exception Exception
	 */
	public final void sendProvisioningEmail(String EmailDefinition, Map Recipients, long TaskInstanceKey) throws Exception {
		emailUtils.sendProvisioningEmail(getEmailDefinition(EmailDefinition), Recipients, getITResData(getEmailITResource()), TaskInstanceKey);
	}

	/**
	 * Sends an email based on email definition for a provisioning task.
	 *
	 * @param EmailDefinitionKey The key of the email definition to use.
	 * @param Recipients A Map of the recipient types and the type for each.  Valid types include <code>TO</code>,
	 *                   <code>CC</code>, or <code>BCC</code>.
	 * @param TaskInstanceKey The key of the process task instance that sends this email.
	 * @exception Exception
	 */
	public final void sendProvisioningEmail(long EmailDefinitionKey, Map Recipients, long TaskInstanceKey) throws Exception {
		emailUtils.sendProvisioningEmail(EmailDefinitionKey, Recipients, getITResData(getEmailITResource()), TaskInstanceKey);
	}
	
	/**
	 * Sends an email based on that user's data.
	 *
	 * @param EmailDefinition The name of the email definition to use.
	 * @param Recipient The recipient email address of this message.
	 * @param ITResourceData A Map containing the attribute value pairs for the IT resource used to send mail through.
	 * @param Username The username of the user that the email is generated about.
	 * @exception Exception
	 */
	public final void sendGeneralEmail(String EmailDefinition, String Recipient, Map ITResourceData, String Username) throws Exception {
		emailUtils.sendGeneralEmail(EmailDefinition, Recipient, ITResourceData, getOimUser(Username));
	}
	
	/**
	 * Sends an email based on that user's data.
	 *
	 * @param EmailDefinition The name of the email definition to use.
	 * @param Recipient The recipient email address of this message.
	 * @param ITResourceData A Map containing the attribute value pairs for the IT resource used to send mail through.
	 * @param UserKey The key of the user that the email is generated about.
	 * @exception Exception
	 */
	public final void sendGeneralEmail(String EmailDefinition, String Recipient, Map ITResourceData, long UserKey) throws Exception {
		emailUtils.sendGeneralEmail(EmailDefinition, Recipient, ITResourceData, UserKey);
	}
	
	/**
	 * Sends an email based on that user's data.
	 *
	 * @param EmailDefinitionKey The key of the email definition to use.
	 * @param Recipient The recipient email address of this message.
	 * @param ITResourceData A Map containing the attribute value pairs for the IT resource used to send mail through.
	 * @param Username The username of the user that the email is generated about.
	 * @exception Exception
	 */
	public final void sendGeneralEmail(long EmailDefinitionKey, String Recipient, Map ITResourceData, String Username) throws Exception {
		emailUtils.sendGeneralEmail(getEmailDefinition(EmailDefinitionKey), Recipient, ITResourceData, getOimUser(Username));
	}
	
	/**
	 * Sends an email based on that user's data.
	 *
	 * @param EmailDefinitionKey The key of the email definition to use.
	 * @param Recipient The recipient email address of this message.
	 * @param ITResourceData A Map containing the attribute value pairs for the IT resource used to send mail through.
	 * @param UserKey The key of the user that the email is generated about.
	 * @exception Exception
	 */
	public final void sendGeneralEmail(long EmailDefinitionKey, String Recipient, Map ITResourceData, long UserKey) throws Exception {
		emailUtils.sendGeneralEmail(getEmailDefinition(EmailDefinitionKey), Recipient, ITResourceData, UserKey);
	}
	
	/**
	 * Sends an email based on that user's data.
	 *
	 * @param EmailDefinition The name of the email definition to use.
	 * @param Recipients A Map of the recipient types and the type for each.  Valid types include <code>TO</code>,
	 *                   <code>CC</code>, or <code>BCC</code>.
	 * @param ITResourceData A Map containing the attribute value pairs for the IT resource used to send mail through.
	 * @param Username The username of the user that the email is generated about.
	 * @exception Exception
	 */
	public final void sendGeneralEmail(String EmailDefinition, Map Recipients, Map ITResourceData, String Username) throws Exception {
		emailUtils.sendGeneralEmail(EmailDefinition, Recipients, ITResourceData, getOimUser(Username));
	}
	
	/**
	 * Sends an email based on that user's data.
	 *
	 * @param EmailDefinition The name of the email definition to use.
	 * @param Recipients A Map of the recipient types and the type for each.  Valid types include <code>TO</code>,
	 *                   <code>CC</code>, or <code>BCC</code>.
	 * @param ITResourceData A Map containing the attribute value pairs for the IT resource used to send mail through.
	 * @param UserKey The key of the user that the email is generated about.
	 * @exception Exception
	 */
	public final void sendGeneralEmail(String EmailDefinition, Map Recipients, Map ITResourceData, long UserKey) throws Exception {
		emailUtils.sendGeneralEmail(EmailDefinition, Recipients, ITResourceData, UserKey);
	}
	
	/**
	 * Sends an email based on that user's data.
	 *
	 * @param EmailDefinitionKey The key of the email definition to use.
	 * @param Recipients A Map of the recipient types and the type for each.  Valid types include <code>TO</code>,
	 *                   <code>CC</code>, or <code>BCC</code>.
	 * @param ITResourceData A Map containing the attribute value pairs for the IT resource used to send mail through.
	 * @param Username The username of the user that the email is generated about.
	 * @exception Exception
	 */
	public final void sendGeneralEmail(long EmailDefinitionKey, Map Recipients, Map ITResourceData, String Username) throws Exception {
		emailUtils.sendGeneralEmail(getEmailDefinition(EmailDefinitionKey), Recipients, ITResourceData, getOimUser(Username));
	}
	
	/**
	 * Sends an email based on that user's data.
	 *
	 * @param EmailDefinitionKey The key of the email definition to use.
	 * @param Recipients A Map of the recipient types and the type for each.  Valid types include <code>TO</code>,
	 *                   <code>CC</code>, or <code>BCC</code>.
	 * @param ITResourceData A Map containing the attribute value pairs for the IT resource used to send mail through.
	 * @param UserKey The key of the user that the email is generated about.
	 * @exception Exception
	 */
	public final void sendGeneralEmail(long EmailDefinitionKey, Map Recipients, Map ITResourceData, long UserKey) throws Exception {
		emailUtils.sendGeneralEmail(getEmailDefinition(EmailDefinitionKey), Recipients, ITResourceData, UserKey);
	}

	/**
	 * Obtains a new JDBC connection directly to the OIM database.
	 *
	 * @return A new JDBC connection to the database.
	 * @exception Exception
	 */
	public final Connection getDirectDB() throws Exception {
		return databaseUtils.getConnection();
	}
	
	/**
	 * Executes an arbitrary query against the OIM database.   Dates will be returned
	 * as both string values under the normal column names, and as raw Date types with 
	 * '_DATE' appended to the column name.
	 * 
	 * @param Query The query to execute.
	 * @return An array of Maps, one Map for each record returned.
	 * @exception Exception
	 */
	public final Map[] getOimData(String Query) throws Exception {
		return databaseUtils.getData(Query);
	}
	
	/**
	 * Executes an arbitraty query against the OIM database.
	 * 
	 * @param Query The query to execute.
	 * @exception Exception
	 */
	public final void executeOimQuery(String Query) throws Exception {
		databaseUtils.executeQuery(Query, true);
	}
	
	/**
	 * Executes an arbitraty query against the OIM database.
	 * 
	 * @param Query The query to execute.
	 * @param Commit <code>true</code> if a commit should be done, <code>false</code> 
	 *               if not.
	 * @exception Exception
	 */
	public final void executeOimQuery(String Query, boolean Commit) throws Exception {
		databaseUtils.executeQuery(Query, Commit);
	}

	/**
	 * Creates a new access policy.
	 *
	 * @param Name The name of the access policy to create.
	 * @param Description The description to set on the new access policy.
	 * @param WithApproval <code>true</true> if the resources in the access policy should be requested for approval, or
	 *                     <code>false</code> if the resources should be provisioned without approval.
	 * @param Retrofit <code>true</true> if changes made to this access policy should be applied to all users that
	 *                 have already received this policy, or <code>false</code> if the changes made to the policy
	 *                 should only be applied to new users moving forward.
	 * @param AllowObject <code>true</code> if the object specified should be provisioned by this policy, or
	 *                    <code>false</code> if the object should be denied by this policy.
	 * @param ObjectName The name representing the type of object to be provisioned or denied by this policy.
	 * @param RevokeIfNoLongerApplies <code>true</code> if the object provisioned by this policy should be revoked
	 *                                when the object is no longer supported by any policy on the system, or
	 *                                <code>false</code> if the object should be left as-is.   This option has no
	 *                                affect if the object is set to deny in the policy rather than provision.
	 * @param GroupName The name of the group to associate the new access policy to.
	 * @exception Exception
	 */
	public final void createAccessPolicy(String Name, String Description, boolean WithApproval, boolean Retrofit, boolean AllowObject, String ObjectName, boolean RevokeIfNoLongerApplies, String GroupName) throws Exception {
		policyUtils.createAccessPolicy(Name, Description, WithApproval, Retrofit, AllowObject, getResourceObject(ObjectName), RevokeIfNoLongerApplies, getOimGroup(GroupName));
	}

	/**
	 * Creates a new access policy.
	 *
	 * @param Name The name of the access policy to create.
	 * @param Description The description to set on the new access policy.
	 * @param WithApproval <code>true</true> if the resources in the access policy should be requested for approval, or
	 *                     <code>false</code> if the resources should be provisioned without approval.
	 * @param Retrofit <code>true</true> if changes made to this access policy should be applied to all users that
	 *                 have already received this policy, or <code>false</code> if the changes made to the policy
	 *                 should only be applied to new users moving forward.
	 * @param AllowObject <code>true</code> if the object specified should be provisioned by this policy, or
	 *                    <code>false</code> if the object should be denied by this policy.
	 * @param ObjectKey The key value representing the type of object to be provisioned or denied by this policy.
	 * @param RevokeIfNoLongerApplies <code>true</code> if the object provisioned by this policy should be revoked
	 *                                when the object is no longer supported by any policy on the system, or
	 *                                <code>false</code> if the object should be left as-is.   This option has no
	 *                                affect if the object is set to deny in the policy rather than provision.
	 * @param GroupName The name of the group to associate the new access policy to.
	 * @exception Exception
	 */
	public final void createAccessPolicy(String Name, String Description, boolean WithApproval, boolean Retrofit, boolean AllowObject, long ObjectKey, boolean RevokeIfNoLongerApplies, String GroupName) throws Exception {
		policyUtils.createAccessPolicy(Name, Description, WithApproval, Retrofit, AllowObject, ObjectKey, RevokeIfNoLongerApplies, getOimGroup(GroupName));
	}

	/**
	 * Creates a new access policy.
	 *
	 * @param Name The name of the access policy to create.
	 * @param Description The description to set on the new access policy.
	 * @param WithApproval <code>true</true> if the resources in the access policy should be requested for approval, or
	 *                     <code>false</code> if the resources should be provisioned without approval.
	 * @param Retrofit <code>true</true> if changes made to this access policy should be applied to all users that
	 *                 have already received this policy, or <code>false</code> if the changes made to the policy
	 *                 should only be applied to new users moving forward.
	 * @param AllowObject <code>true</code> if the object specified should be provisioned by this policy, or
	 *                    <code>false</code> if the object should be denied by this policy.
	 * @param ObjectName The name representing the type of object to be provisioned or denied by this policy.
	 * @param RevokeIfNoLongerApplies <code>true</code> if the object provisioned by this policy should be revoked
	 *                                when the object is no longer supported by any policy on the system, or
	 *                                <code>false</code> if the object should be left as-is.   This option has no
	 *                                affect if the object is set to deny in the policy rather than provision.
	 * @param GroupKey The key value for the group to associate the new access policy to.
	 * @exception Exception
	 */
	public final void createAccessPolicy(String Name, String Description, boolean WithApproval, boolean Retrofit, boolean AllowObject, String ObjectName, boolean RevokeIfNoLongerApplies, long GroupKey) throws Exception {
		policyUtils.createAccessPolicy(Name, Description, WithApproval, Retrofit, AllowObject, getResourceObject(ObjectName), RevokeIfNoLongerApplies, GroupKey);
	}

	/**
	 * Creates a new access policy.
	 *
	 * @param Name The name of the access policy to create.
	 * @param Description The description to set on the new access policy.
	 * @param WithApproval <code>true</true> if the resources in the access policy should be requested for approval, or
	 *                     <code>false</code> if the resources should be provisioned without approval.
	 * @param Retrofit <code>true</true> if changes made to this access policy should be applied to all users that
	 *                 have already received this policy, or <code>false</code> if the changes made to the policy
	 *                 should only be applied to new users moving forward.
	 * @param AllowObject <code>true</code> if the object specified should be provisioned by this policy, or
	 *                    <code>false</code> if the object should be denied by this policy.
	 * @param ObjectKey The key value representing the type of object to be provisioned or denied by this policy.
	 * @param RevokeIfNoLongerApplies <code>true</code> if the object provisioned by this policy should be revoked
	 *                                when the object is no longer supported by any policy on the system, or
	 *                                <code>false</code> if the object should be left as-is.   This option has no
	 *                                affect if the object is set to deny in the policy rather than provision.
	 * @param GroupKey The key value for the group to associate the new access policy to.
	 * @exception Exception
	 */
	public final void createAccessPolicy(String Name, String Description, boolean WithApproval, boolean Retrofit, boolean AllowObject, long ObjectKey, boolean RevokeIfNoLongerApplies, long GroupKey) throws Exception {
		policyUtils.createAccessPolicy(Name, Description, WithApproval, Retrofit, AllowObject, ObjectKey, RevokeIfNoLongerApplies, GroupKey);
	}

	/**
	 * Gets the access policy key for a given access policy name.
	 *
	 * @param Name The name of the access policy to get the key for.
	 * @return The key for the access policy.
	 * @exception Exception
	 */
	public final long getAccessPolicy(String Name) throws Exception {
		return policyUtils.getAccessPolicy(Name);
	}

	/**
	 * Gets an array of maps, each record containg attribute value pairs for each access policy
	 * on the system.
	 *
	 * @return An array maps, each record containg attribute value pairs for each access policy
	 * on the system.
	 * @exception Exception
	 */
	public final Map[] getAllAccessPolicies() throws Exception {
		return policyUtils.getAllAccessPolicies();
	}

	/**
	 * Gets attributes for an access policy.
	 *
	 * @param PolicyName The name of the access policy to retrieve the values from.
	 * @return The value of the requested attribute for the requested policy.
	 * @exception Exception
	 */
	public final Map getPolicyAttributes(String PolicyName) throws Exception {
		return policyUtils.getAccessPolicyAttributes(getAccessPolicy(PolicyName));
	}

	/**
	 * Gets attributes for an access policy.
	 *
	 * @param PolicyKey The key value for the access policy to retrieve the values from.
	 * @return The value of the requested attribute for the requested policy.
	 * @exception Exception
	 */
	public final Map getPolicyAttributes(long PolicyKey) throws Exception {
		return policyUtils.getAccessPolicyAttributes(PolicyKey);
	}

	/**
	 * Gets an access policy attribute.
	 *
	 * @param PolicyName The name of the access policy to retrieve the value from.
	 * @param Attribute The name of the attribute to retrieve the value for.
	 * @return The value of the requested attribute for the requested policy.
	 * @exception Exception
	 */
	public final String getPolicyAttribute(String PolicyName, String Attribute) throws Exception {
		return policyUtils.getAccessPolicyAttribute(getAccessPolicy(PolicyName), Attribute);
	}

	/**
	 * Gets an access policy attribute.
	 *
	 * @param PolicyKey The key value for the access policy to retrieve the value from.
	 * @param Attribute The name of the attribute to retrieve the value for.
	 * @return The value of the requested attribute for the requested policy.
	 * @exception Exception
	 */
	public final String getPolicyAttribute(long PolicyKey, String Attribute) throws Exception {
		return policyUtils.getAccessPolicyAttribute(PolicyKey, Attribute);
	}

	/**
	 * Sets an access policy attribute.
	 *
	 * @param PolicyName The name of the access policy to set a value for.
	 * @param Attribute The name of the attribute to set the value for.
	 * @param Value The value to set for the specified attribute and policy.
	 * @exception Exception
	 */
	public final void setPolicyAttribute(String PolicyName, String Attribute, String Value) throws Exception {
		policyUtils.setAccessPolicyAttribute(getAccessPolicy(PolicyName), Attribute, Value);
	}

	/**
	 * Sets an access policy attribute.
	 *
	 * @param PolicyKey The key value for the access policy to set a value for.
	 * @param Attribute The name of the attribute to set the value for.
	 * @param Value The value to set for the specified attribute and policy.
	 * @exception Exception
	 */
	public final void setPolicyAttribute(long PolicyKey, String Attribute, String Value) throws Exception {
		policyUtils.setAccessPolicyAttribute(PolicyKey, Attribute, Value);
	}

	/**
	 * Sets an access policy attribute.
	 *
	 * @param PolicyName The name of the access policy to set a value for.
	 * @param Attribute The name of the attribute to set the value for.
	 * @param Value The value to set for the specified attribute and policy.
	 * @exception Exception
	 */
	public final void setPolicyAttribute(String PolicyName, String Attribute, boolean Value) throws Exception {
		policyUtils.setAccessPolicyAttribute(getAccessPolicy(PolicyName), Attribute, Value);
	}

	/**
	 * Sets an access policy attribute.
	 *
	 * @param PolicyKey The key value for the access policy to set a value for.
	 * @param Attribute The name of the attribute to set the value for.
	 * @param Value The value to set for the specified attribute and policy.
	 * @exception Exception
	 */
	public final void setPolicyAttribute(long PolicyKey, String Attribute, boolean Value) throws Exception {
		policyUtils.setAccessPolicyAttribute(PolicyKey, Attribute, Value);
	}

	/**
	 * Associates a group with an access policy.
	 *
	 * @param PolicyName The name of the access policy to associate with the group.
	 * @param GroupName The name of the group to associate with the access policy.
	 * @exception Exception
	 */
	public final void addGroupToPolicy(String PolicyName, String GroupName) throws Exception {
		policyUtils.addGroupToPolicy(getAccessPolicy(PolicyName), getOimGroup(GroupName));
	}

	/**
	 * Associates a group with an access policy.
	 *
	 * @param PolicyKey The key value for the access policy to associate with the group.
	 * @param GroupName The name of for the group to associate with the access policy.
	 * @exception Exception
	 */
	public final void addGroupToPolicy(long PolicyKey, String GroupName) throws Exception {
		policyUtils.addGroupToPolicy(PolicyKey, getOimGroup(GroupName));
	}

	/**
	 * Associates a group with an access policy.
	 *
	 * @param PolicyName The name of the access policy to associate with the group.
	 * @param GroupKey The key for the group to associate with the access policy.
	 * @exception Exception
	 */
	public final void addGroupToPolicy(String PolicyName, long GroupKey) throws Exception {
		policyUtils.addGroupToPolicy(getAccessPolicy(PolicyName), GroupKey);
	}

	/**
	 * Associates a group with an access policy.
	 *
	 * @param PolicyKey The key value for the access policy to associate with the group.
	 * @param GroupKey The key for the group to associate with the access policy.
	 * @exception Exception
	 */
	public final void addGroupToPolicy(long PolicyKey, long GroupKey) throws Exception {
		policyUtils.addGroupToPolicy(PolicyKey, GroupKey);
	}

	/**
	 * De-associates a group with an access policy.
	 *
	 * @param PolicyName The name of the access policy to de-associate from the group.
	 * @param GroupName The name of the group to de-associate from the access policy.
	 * @exception Exception
	 */
	public final void removeGroupFromPolicy(String PolicyName, String GroupName) throws Exception {
		policyUtils.removeGroupFromPolicy(getAccessPolicy(PolicyName), getOimGroup(GroupName));
	}

	/**
	 * De-associates a group with an access policy.
	 *
	 * @param PolicyKey The key value for the access policy to de-associate from the group.
	 * @param GroupName The name of the group to de-associate from the access policy.
	 * @exception Exception
	 */
	public final void removeGroupFromPolicy(long PolicyKey, String GroupName) throws Exception {
		policyUtils.removeGroupFromPolicy(PolicyKey, getOimGroup(GroupName));
	}

	/**
	 * De-associates a group with an access policy.
	 *
	 * @param PolicyName The name of the access policy to de-associate from the group.
	 * @param GroupKey The key for the group to de-associate from the access policy.
	 * @exception Exception
	 */
	public final void removeGroupFromPolicy(String PolicyName, long GroupKey) throws Exception {
		policyUtils.removeGroupFromPolicy(getAccessPolicy(PolicyName), GroupKey);
	}

	/**
	 * De-associates a group with an access policy.
	 *
	 * @param PolicyKey The key value for the access policy to de-associate from the group.
	 * @param GroupKey The key for the group to de-associate from the access policy.
	 * @exception Exception
	 */
	public final void removeGroupFromPolicy(long PolicyKey, long GroupKey) throws Exception {
		policyUtils.removeGroupFromPolicy(PolicyKey, GroupKey);
	}

	/**
	 * Gets an array of groups that are currently associated with an access policy.
	 *
	 * @param PolicyName The name of the access policy to get a lists of groups for.
	 * @return An array of groups that are currently associated with an access policy.
	 * @exception Exception
	 */
	public final String[] getPolicyGroups(String PolicyName) throws Exception {
		return policyUtils.getPolicyGroups(getAccessPolicy(PolicyName));
	}

	/**
	 * Gets an array of groups that are currently associated with an access policy.
	 *
	 * @param PolicyKey The key value for the access policy to get a lists of groups for.
	 * @return An array of groups that are currently associated with an access policy.
	 * @exception Exception
	 */
	public final String[] getPolicyGroups(long PolicyKey) throws Exception {
		return policyUtils.getPolicyGroups(PolicyKey);
	}
	
	/**
	 * Gets an array of access policies that are currently associated with a group.
	 *
	 * @param GroupName The name of the group to get the associated access policies for.
	 * @return An array of access policies that are currently associated with a group.
	 * @exception Exception
	 */
	public final String[] getPoliciesForGroup(String GroupName) throws Exception {
		return policyUtils.getPoliciesForGroup(getOimGroup(GroupName));
	}
	
	/**
	 * Gets an array of access policies that are currently associated with a group.
	 *
	 * @param GroupKey The key value for the group to get the associated access policies for.
	 * @return An array of access policies that are currently associated with a group.
	 * @exception Exception
	 */
	public final String[] getPoliciesForGroup(long GroupKey) throws Exception {
		return policyUtils.getPoliciesForGroup(GroupKey);
	}

		/**
	 * Gets a Map access policies names and keys that are currently associated with a group.
	 *
	 * @param GroupName Thename of the group to get the associated access policies for.
	 * @return A Map access policies names and keys that are currently associated with a group.
	 * @exception Exception
	 */
	public final Map getPoliciesForGroupDetailed(String GroupName) throws Exception {
		return policyUtils.getPoliciesForGroupDetailed(getOimGroup(GroupName));
	}

	/**
	 * Gets a Map access policies names and keys that are currently associated with a group.
	 *
	 * @param GroupKey The key value for the group to get the associated access policies for.
	 * @return A Map access policies names and keys that are currently associated with a group.
	 * @exception Exception
	 */
	public final Map getPoliciesForGroupDetailed(long GroupKey) throws Exception {
		return policyUtils.getPoliciesForGroupDetailed(GroupKey);
	}

	/**
	 * Adds a resource to the list of resources to provision by this access policy.
	 *
	 * @param PolicyName The name of the access policy to add this resource to.
	 * @param ObjectName The name of the object type associate with this access policy.
	 * @param RevokeIfNoLongerApplies <code>true</code> if the object provisioned by this policy should be revoked
	 *                                when the object is no longer supported by any policy on the system, or
	 *                                <code>false</code> if the object should be left as-is.
	 * @exception Exception
	 */
	public final void addResourceAllowToPolicy(String PolicyName, String ObjectName, boolean RevokeIfNoLongerApplies) throws Exception {
		policyUtils.addResourceAllowToPolicy(getAccessPolicy(PolicyName), getResourceObject(ObjectName), RevokeIfNoLongerApplies);
	}

	/**
	 * Adds a resource to the list of resources to provision by this access policy.
	 *
	 * @param PolicyKey The key value for the access policy to add this resource to.
	 * @param ObjectName The name of the object type associate with this access policy.
	 * @param RevokeIfNoLongerApplies <code>true</code> if the object provisioned by this policy should be revoked
	 *                                when the object is no longer supported by any policy on the system, or
	 *                                <code>false</code> if the object should be left as-is.
	 * @exception Exception
	 */
	public final void addResourceAllowToPolicy(long PolicyKey, String ObjectName, boolean RevokeIfNoLongerApplies) throws Exception {
		policyUtils.addResourceAllowToPolicy(PolicyKey, getResourceObject(ObjectName), RevokeIfNoLongerApplies);
	}

	/**
	 * Adds a resource to the list of resources to provision by this access policy.
	 *
	 * @param PolicyName The name of the access policy to add this resource to.
	 * @param ObjectKey The key value for the object type associate with this access policy.
	 * @param RevokeIfNoLongerApplies <code>true</code> if the object provisioned by this policy should be revoked
	 *                                when the object is no longer supported by any policy on the system, or
	 *                                <code>false</code> if the object should be left as-is.
	 * @exception Exception
	 */
	public final void addResourceAllowToPolicy(String PolicyName, long ObjectKey, boolean RevokeIfNoLongerApplies) throws Exception {
		policyUtils.addResourceAllowToPolicy(getAccessPolicy(PolicyName), ObjectKey, RevokeIfNoLongerApplies);
	}

	/**
	 * Adds a resource to the list of resources to provision by this access policy.
	 *
	 * @param PolicyKey The key value for the access policy to add this resource to.
	 * @param ObjectKey The key value for the object type associate with this access policy.
	 * @param RevokeIfNoLongerApplies <code>true</code> if the object provisioned by this policy should be revoked
	 *                                when the object is no longer supported by any policy on the system, or
	 *                                <code>false</code> if the object should be left as-is.
	 * @exception Exception
	 */
	public final void addResourceAllowToPolicy(long PolicyKey, long ObjectKey, boolean RevokeIfNoLongerApplies) throws Exception {
		policyUtils.addResourceAllowToPolicy(PolicyKey, ObjectKey, RevokeIfNoLongerApplies);
	}

	/**
	 * Remove a resource from the list of resources to provision by this access policy.
	 *
	 * @param PolicyName The name of the access policy to remove this resource from.
	 * @param ObjectName The name of the object type de-associate from this access policy.
	 * @exception Exception
	 */
	public final void removeResourceAllowFromPolicy(String PolicyName, String ObjectName) throws Exception {
		policyUtils.removeResourceAllowFromPolicy(getAccessPolicy(PolicyName), getResourceObject(ObjectName));
	}

	/**
	 * Remove a resource from the list of resources to provision by this access policy.
	 *
	 * @param PolicyKey The key value for the access policy to remove this resource from.
	 * @param ObjectName The name of the object type de-associate from this access policy.
	 * @exception Exception
	 */
	public final void removeResourceAllowFromPolicy(long PolicyKey, String ObjectName) throws Exception {
		policyUtils.removeResourceAllowFromPolicy(PolicyKey, getResourceObject(ObjectName));
	}

	/**
	 * Remove a resource from the list of resources to provision by this access policy.
	 *
	 * @param PolicyName The name of the access policy to remove this resource from.
	 * @param ObjectKey The key value for the object type de-associate from this access policy.
	 * @exception Exception
	 */
	public final void removeResourceAllowFromPolicy(String PolicyName, long ObjectKey) throws Exception {
		policyUtils.removeResourceAllowFromPolicy(getAccessPolicy(PolicyName), ObjectKey);
	}

	/**
	 * Remove a resource from the list of resources to provision by this access policy.
	 *
	 * @param PolicyKey The key value for the access policy to remove this resource from.
	 * @param ObjectKey The key value for the object type de-associate from this access policy.
	 * @exception Exception
	 */
	public final void removeResourceAllowFromPolicy(long PolicyKey, long ObjectKey) throws Exception {
		policyUtils.removeResourceAllowFromPolicy(PolicyKey, ObjectKey);
	}

	/**
	 * Gets a list of object types for resources provisioned by this access policy.
	 *
	 * @param PolicyName The name of the access policy to get the list of allow resource types for.
	 * @return An array of object types, one for each allow resource type.
	 * @exception Exception
	 */
	public final String[] getPolicyAllowedResources(String PolicyName) throws Exception {
		return policyUtils.getAllowedResources(getAccessPolicy(PolicyName));
	}

	/**
	 * Gets a list of object types for resources provisioned by this access policy.
	 *
	 * @param PolicyKey The key value for the access policy to get the list of allow resource types for.
	 * @return An array of object types, one for each allow resource type.
	 * @exception Exception
	 */
	public final String[] getPolicyAllowedResources(long PolicyKey) throws Exception {
		return policyUtils.getAllowedResources(PolicyKey);
	}

	/**
	 * Adds a resource to the list of resources to deny by this access policy.
	 *
	 * @param PolicyName The name of the access policy to add this resource to.
	 * @param ObjectKey The key value for the object type associate with this access policy.
	 * @exception Exception
	 */
	public final void addResourceDenyToPolicy(String PolicyName, long ObjectKey) throws Exception {
		policyUtils.addResourceDenyToPolicy(getAccessPolicy(PolicyName), ObjectKey);
	}

	/**
	 * Adds a resource to the list of resources to deny by this access policy.
	 *
	 * @param PolicyKey The key value for the access policy to add this resource to.
	 * @param ObjectKey The key value for the object type associate with this access policy.
	 * @exception Exception
	 */
	public final void addResourceDenyToPolicy(long PolicyKey, long ObjectKey) throws Exception {
		policyUtils.addResourceDenyToPolicy(PolicyKey, ObjectKey);
	}

	/**
	 * Adds a resource to the list of resources to deny by this access policy.
	 *
	 * @param PolicyName The name of the access policy to add this resource to.
	 * @param ObjectName The name of the object type associate with this access policy.
	 * @exception Exception
	 */
	public final void addResourceDenyToPolicy(String PolicyName, String ObjectName) throws Exception {
		policyUtils.addResourceDenyToPolicy(getAccessPolicy(PolicyName), getResourceObject(ObjectName));
	}

	/**
	 * Adds a resource to the list of resources to deny by this access policy.
	 *
	 * @param PolicyKey The key value for the access policy to add this resource to.
	 * @param ObjectName The name of the object type associate with this access policy.
	 * @exception Exception
	 */
	public final void addResourceDenyToPolicy(long PolicyKey, String ObjectName) throws Exception {
		policyUtils.addResourceDenyToPolicy(PolicyKey, getResourceObject(ObjectName));
	}

	/**
	 * Remove a resource from the list of resources to deny by this access policy.
	 *
	 * @param PolicyName The name of the access policy to remove this resource from.
	 * @param ObjectName The name of the object type de-associate from this access policy.
	 * @exception Exception
	 */
	public final void removeResourceDenyFromPolicy(String PolicyName, String ObjectName) throws Exception {
		policyUtils.removeResourceDenyFromPolicy(getAccessPolicy(PolicyName), getResourceObject(ObjectName));
	}

	/**
	 * Remove a resource from the list of resources to deny by this access policy.
	 *
	 * @param PolicyKey The key value for the access policy to remove this resource from.
	 * @param ObjectName The name of the object type de-associate from this access policy.
	 * @exception Exception
	 */
	public final void removeResourceDenyFromPolicy(long PolicyKey, String ObjectName) throws Exception {
		policyUtils.removeResourceDenyFromPolicy(PolicyKey, getResourceObject(ObjectName));
	}

	/**
	 * Remove a resource from the list of resources to deny by this access policy.
	 *
	 * @param PolicyName The name of the access policy to remove this resource from.
	 * @param ObjectKey The key value for the object type de-associate from this access policy.
	 * @exception Exception
	 */
	public final void removeResourceDenyFromPolicy(String PolicyName, long ObjectKey) throws Exception {
		policyUtils.removeResourceDenyFromPolicy(getAccessPolicy(PolicyName), ObjectKey);
	}

	/**
	 * Remove a resource from the list of resources to deny by this access policy.
	 *
	 * @param PolicyKey The key value for the access policy to remove this resource from.
	 * @param ObjectKey The key value for the object type de-associate from this access policy.
	 * @exception Exception
	 */
	public final void removeResourceDenyFromPolicy(long PolicyKey, long ObjectKey) throws Exception {
		policyUtils.removeResourceDenyFromPolicy(PolicyKey, ObjectKey);
	}

	/**
	 * Gets a list of object types for resources provisioned by this access policy.
	 *
	 * @param PolicyName The name of the access policy to get the list of allow resource types for.
	 * @return An array of object types, one for each allow resource type.
	 * @exception Exception
	 */
	public final String[] getPolicyDeniedResources(String PolicyName) throws Exception {
		return policyUtils.getDeniedResources(getAccessPolicy(PolicyName));
	}

	/**
	 * Gets a list of object types for resources provisioned by this access policy.
	 *
	 * @param PolicyKey The key value for the access policy to get the list of allow resource types for.
	 * @return An array of object types, one for each allow resource type.
	 * @exception Exception
	 */
	public final String[] getPolicyDeniedResources(long PolicyKey) throws Exception {
		return policyUtils.getDeniedResources(PolicyKey);
	}

	/**
	 * Sets an attribute on a provisioned resource template in an access policy.
	 *
	 * @param PolicyName The name of the access policy to set the resource attribute on.
	 * @param ObjectName The name of the resource object type to set the attribute on.
	 * @param Attribute The name of the resource attribute to set the value for.
	 * @param Value The value to set for the specified attribute.
	 * @exception Exception
	 */
	public final void setPolicyResourceAttribute(String PolicyName, String ObjectName, String Attribute, String Value) throws Exception {
		policyUtils.setResourceAttribute(getAccessPolicy(PolicyName), getResourceObject(ObjectName), Attribute, Value);
	}

	/**
	 * Sets an attribute on a provisioned resource template in an access policy.
	 *
	 * @param PolicyKey The key value for the access policy to set the resource attribute on.
	 * @param ObjectName The name of the resource object type to set the attribute on.
	 * @param Attribute The name of the resource attribute to set the value for.
	 * @param Value The value to set for the specified attribute.
	 * @exception Exception
	 */
	public final void setPolicyResourceAttribute(long PolicyKey, String ObjectName, String Attribute, String Value) throws Exception {
		policyUtils.setResourceAttribute(PolicyKey, getResourceObject(ObjectName), Attribute, Value);
	}

	/**
	 * Sets an attribute on a provisioned resource template in an access policy.
	 *
	 * @param PolicyName The name of the access policy to set the resource attribute on.
	 * @param ObjectKey The key value for the resource object type to set the attribute on.
	 * @param Attribute The name of the resource attribute to set the value for.
	 * @param Value The value to set for the specified attribute.
	 * @exception Exception
	 */
	public final void setPolicyResourceAttribute(String PolicyName, long ObjectKey, String Attribute, String Value) throws Exception {
		policyUtils.setResourceAttribute(getAccessPolicy(PolicyName), ObjectKey, Attribute, Value);
	}

	/**
	 * Sets an attribute on a provisioned resource template in an access policy.
	 *
	 * @param PolicyKey The key value for the access policy to set the resource attribute on.
	 * @param ObjectKey The key value for the resource object type to set the attribute on.
	 * @param Attribute The name of the resource attribute to set the value for.
	 * @param Value The value to set for the specified attribute.
	 * @exception Exception
	 */
	public final void setPolicyResourceAttribute(long PolicyKey, long ObjectKey, String Attribute, String Value) throws Exception {
		policyUtils.setResourceAttribute(PolicyKey, ObjectKey, Attribute, Value);
	}

	/**
	 * Clears an attribute from a provisioned resource template in an access policy.
	 *
	 * @param PolicyName The name of the access policy to clear the resource attribute on.
	 * @param ObjectName The name of the resource object type to clear the attribute for.
	 * @param Attribute The name of the resource attribute to clear the value for.
	 * @exception Exception
	 */
	public final void clearPolicyResourceAttribute(String PolicyName, String ObjectName, String Attribute) throws Exception {
		policyUtils.clearResourceAttribute(getAccessPolicy(PolicyName), getResourceObject(ObjectName), Attribute);
	}

	/**
	 * Clears an attribute from a provisioned resource template in an access policy.
	 *
	 * @param PolicyKey The key value for the access policy to clear the resource attribute on.
	 * @param ObjectName The name of the resource object type to clear the attribute for.
	 * @param Attribute The name of the resource attribute to clear the value for.
	 * @exception Exception
	 */
	public final void clearPolicyResourceAttribute(long PolicyKey, String ObjectName, String Attribute) throws Exception {
		policyUtils.clearResourceAttribute(PolicyKey, getResourceObject(ObjectName), Attribute);
	}

	/**
	 * Clears an attribute from a provisioned resource template in an access policy.
	 *
	 * @param PolicyName The name of the access policy to clear the resource attribute on.
	 * @param ObjectKey The key value for the resource object type to clear the attribute for.
	 * @param Attribute The name of the resource attribute to clear the value for.
	 * @exception Exception
	 */
	public final void clearPolicyResourceAttribute(String PolicyName, long ObjectKey, String Attribute) throws Exception {
		policyUtils.clearResourceAttribute(getAccessPolicy(PolicyName), ObjectKey, Attribute);
	}

	/**
	 * Clears an attribute from a provisioned resource template in an access policy.
	 *
	 * @param PolicyKey The key value for the access policy to clear the resource attribute on.
	 * @param ObjectKey The key value for the resource object type to clear the attribute for.
	 * @param Attribute The name of the resource attribute to clear the value for.
	 * @exception Exception
	 */
	public final void clearPolicyResourceAttribute(long PolicyKey, long ObjectKey, String Attribute) throws Exception {
		policyUtils.clearResourceAttribute(PolicyKey, ObjectKey, Attribute);
	}

	/**
	 * Gets a map of resource attribute-value pairs for a given resource template on a policy.
	 *
	 * @param PolicyName The name of the access policy to get the resource attributes for.
	 * @param ObjectName The name of the resource object type to get the attributes for.
	 * @return A map of attribute-value pairs for the given resource type for the specified policy.
	 * @exception Exception
	 */
	public final Map getPolicyResourceAttributes(String PolicyName, String ObjectName) throws Exception {
		return policyUtils.getResourceAttributes(getAccessPolicy(PolicyName), getResourceObject(ObjectName));
	}

	/**
	 * Gets a map of resource attribute-value pairs for a given resource template on a policy.
	 *
	 * @param PolicyKey The key value for the access policy to get the resource attributes for.
	 * @param ObjectName The name of the resource object type to get the attributes for.
	 * @return A map of attribute-value pairs for the given resource type for the specified policy.
	 * @exception Exception
	 */
	public final Map getPolicyResourceAttributes(long PolicyKey, String ObjectName) throws Exception {
		return policyUtils.getResourceAttributes(PolicyKey, getResourceObject(ObjectName));
	}

	/**
	 * Gets a map of resource attribute-value pairs for a given resource template on a policy.
	 *
	 * @param PolicyName The name of the access policy to get the resource attributes for.
	 * @param ObjectKey The key value for the resource object type to get the attributes for.
	 * @return A map of attribute-value pairs for the given resource type for the specified policy.
	 * @exception Exception
	 */
	public final Map getPolicyResourceAttributes(String PolicyName, long ObjectKey) throws Exception {
		return policyUtils.getResourceAttributes(getAccessPolicy(PolicyName), ObjectKey);
	}

	/**
	 * Gets a map of resource attribute-value pairs for a given resource template on a policy.
	 *
	 * @param PolicyKey The key value for the access policy to get the resource attributes for.
	 * @param ObjectKey The key value for the resource object type to get the attributes for.
	 * @return A map of attribute-value pairs for the given resource type for the specified policy.
	 * @exception Exception
	 */
	public final Map getPolicyResourceAttributes(long PolicyKey, long ObjectKey) throws Exception {
		return policyUtils.getResourceAttributes(PolicyKey, ObjectKey);
	}

	/**
	 * Gets a specific resource attribute value for a given resource template on a policy.
	 *
	 * @param PolicyName The name of the access policy to get the resource attributes for.
	 * @param ObjectName The name of the resource object type to get the attributes for.
	 * @param Attribute The name of the resource attribute to retrieve the value for.
	 * @return The value fo the specified attribute for the given resource type for the specified policy.
	 * @exception Exception
	 */
	public final String getPolicyResourceAttribute(String PolicyName, String ObjectName, String Attribute) throws Exception {
		return policyUtils.getResourceAttribute(getAccessPolicy(PolicyName), getResourceObject(ObjectName), Attribute);
	}

	/**
	 * Gets a specific resource attribute value for a given resource template on a policy.
	 *
	 * @param PolicyKey The key value for the access policy to get the resource attributes for.
	 * @param ObjectName The name of the resource object type to get the attributes for.
	 * @param Attribute The name of the resource attribute to retrieve the value for.
	 * @return The value fo the specified attribute for the given resource type for the specified policy.
	 * @exception Exception
	 */
	public final String getPolicyResourceAttribute(long PolicyKey, String ObjectName, String Attribute) throws Exception {
		return policyUtils.getResourceAttribute(PolicyKey, getResourceObject(ObjectName), Attribute);
	}

	/**
	 * Gets a specific resource attribute value for a given resource template on a policy.
	 *
	 * @param PolicyName The name of the access policy to get the resource attributes for.
	 * @param ObjectKey The key value for the resource object type to get the attributes for.
	 * @param Attribute The name of the resource attribute to retrieve the value for.
	 * @return The value fo the specified attribute for the given resource type for the specified policy.
	 * @exception Exception
	 */
	public final String getPolicyResourceAttribute(String PolicyName, long ObjectKey, String Attribute) throws Exception {
		return policyUtils.getResourceAttribute(getAccessPolicy(PolicyName), ObjectKey, Attribute);
	}

	/**
	 * Gets a specific resource attribute value for a given resource template on a policy.
	 *
	 * @param PolicyKey The key value for the access policy to get the resource attributes for.
	 * @param ObjectKey The key value for the resource object type to get the attributes for.
	 * @param Attribute The name of the resource attribute to retrieve the value for.
	 * @return The value fo the specified attribute for the given resource type for the specified policy.
	 * @exception Exception
	 */
	public final String getPolicyResourceAttribute(long PolicyKey, long ObjectKey, String Attribute) throws Exception {
		return policyUtils.getResourceAttribute(PolicyKey, ObjectKey, Attribute);
	}

	/**
	 * Adds a child table record to a resource template for a policy.
	 *
	 * @param PolicyName The name of the access policy to add the resource child attributes to.
	 * @param ObjectName The name of the resource object type to add the child attributes to.
	 * @param ChildTable The name of the child table to add the record to.
	 * @param Data The attribute-value pairs to add as a new child record.
	 * @exception Exception
	 */
	public final void addPolicyResourceChildData(String PolicyName, String ObjectName, String ChildTable, Map Data) throws Exception {
		policyUtils.addResourceChildData(getAccessPolicy(PolicyName), getResourceObject(ObjectName), ChildTable, Data);
	}

	/**
	 * Adds a child table record to a resource template for a policy.
	 *
	 * @param PolicyKey The key value for the access policy to add the resource child attributes to.
	 * @param ObjectName The name of the resource object type to add the child attributes to.
	 * @param ChildTable The name of the child table to add the record to.
	 * @param Data The attribute-value pairs to add as a new child record.
	 * @exception Exception
	 */
	public final void addPolicyResourceChildData(long PolicyKey, String ObjectName, String ChildTable, Map Data) throws Exception {
		policyUtils.addResourceChildData(PolicyKey, getResourceObject(ObjectName), ChildTable, Data);
	}

	/**
	 * Adds a child table record to a resource template for a policy.
	 *
	 * @param PolicyName The name of the access policy to add the resource child attributes to.
	 * @param ObjectKey The key value for the resource object type to add the child attributes to.
	 * @param ChildTable The name of the child table to add the record to.
	 * @param Data The attribute-value pairs to add as a new child record.
	 * @exception Exception
	 */
	public final void addPolicyResourceChildData(String PolicyName, long ObjectKey, String ChildTable, Map Data) throws Exception {
		policyUtils.addResourceChildData(getAccessPolicy(PolicyName), ObjectKey, ChildTable, Data);
	}

	/**
	 * Adds a child table record to a resource template for a policy.
	 *
	 * @param PolicyKey The key value for the access policy to add the resource child attributes to.
	 * @param ObjectKey The key value for the resource object type to add the child attributes to.
	 * @param ChildTable The name of the child table to add the record to.
	 * @param Data The attribute-value pairs to add as a new child record.
	 * @exception Exception
	 */
	public final void addPolicyResourceChildData(long PolicyKey, long ObjectKey, String ChildTable, Map Data) throws Exception {
		policyUtils.addResourceChildData(PolicyKey, ObjectKey, ChildTable, Data);
	}

	/**
	 * Removes a child table record from a resource template for a policy.
	 *
	 * @param PolicyName The name of the access policy to remove the resource child attributes from.
	 * @param ObjectName The name of the resource object type to remove the child attributes from.
	 * @param ChildTable The name of the child table to remove the record from.
	 * @param Data The attribute-value pairs that form the child record to be removed.
	 * @exception Exception
	 */
	public final void removePolicyResourceChildData(String PolicyName, String ObjectName, String ChildTable, Map Data) throws Exception {
		policyUtils.removeResourceChildData(getAccessPolicy(PolicyName), getResourceObject(ObjectName), ChildTable, Data);
	}

	/**
	 * Removes a child table record from a resource template for a policy.
	 *
	 * @param PolicyKey The key value for the access policy to remove the resource child attributes from.
	 * @param ObjectName The name of the resource object type to remove the child attributes from.
	 * @param ChildTable The name of the child table to remove the record from.
	 * @param Data The attribute-value pairs that form the child record to be removed.
	 * @exception Exception
	 */
	public final void removePolicyResourceChildData(long PolicyKey, String ObjectName, String ChildTable, Map Data) throws Exception {
		policyUtils.removeResourceChildData(PolicyKey, getResourceObject(ObjectName), ChildTable, Data);
	}

	/**
	 * Removes a child table record from a resource template for a policy.
	 *
	 * @param PolicyName The name of the access policy to remove the resource child attributes from.
	 * @param ObjectKey The key value for the resource object type to remove the child attributes from.
	 * @param ChildTable The name of the child table to remove the record from.
	 * @param Data The attribute-value pairs that form the child record to be removed.
	 * @exception Exception
	 */
	public final void removePolicyResourceChildData(String PolicyName, long ObjectKey, String ChildTable, Map Data) throws Exception {
		policyUtils.removeResourceChildData(getAccessPolicy(PolicyName), ObjectKey, ChildTable, Data);
	}

	/**
	 * Removes a child table record from a resource template for a policy.
	 *
	 * @param PolicyKey The key value for the access policy to remove the resource child attributes from.
	 * @param ObjectKey The key value for the resource object type to remove the child attributes from.
	 * @param ChildTable The name of the child table to remove the record from.
	 * @param Data The attribute-value pairs that form the child record to be removed.
	 * @exception Exception
	 */
	public final void removePolicyResourceChildData(long PolicyKey, long ObjectKey, String ChildTable, Map Data) throws Exception {
		policyUtils.removeResourceChildData(PolicyKey, ObjectKey, ChildTable, Data);
	}

	/**
	 * Gets an array of maps, one map for each child table record.  Each map contains the attribute-value
	 * pairs for the child table record.
	 *
	 * @param PolicyName The name of the access policy to get the resource child attributes for.
	 * @param ObjectName The name of the resource object type to get the child attributes for.
	 * @param ChildTable The name of the child table to get the records for.
	 * @return An array of maps, one map for each child table record.
	 * @exception Exception
	 */
	public final Map[] getPolicyResourceChildData(String PolicyName, String ObjectName, String ChildTable) throws Exception {
		return policyUtils.getResourceChildData(getAccessPolicy(PolicyName), getResourceObject(ObjectName), ChildTable);
	}

	/**
	 * Gets an array of maps, one map for each child table record.  Each map contains the attribute-value
	 * pairs for the child table record.
	 *
	 * @param PolicyKey The key value for the access policy to get the resource child attributes for.
	 * @param ObjectName The name of the resource object type to get the child attributes for.
	 * @param ChildTable The name of the child table to get the records for.
	 * @return An array of maps, one map for each child table record.
	 * @exception Exception
	 */
	public final Map[] getPolicyResourceChildData(long PolicyKey, String ObjectName, String ChildTable) throws Exception {
		return policyUtils.getResourceChildData(PolicyKey, getResourceObject(ObjectName), ChildTable);
	}

	/**
	 * Gets an array of maps, one map for each child table record.  Each map contains the attribute-value
	 * pairs for the child table record.
	 *
	 * @param PolicyName The name of the access policy to get the resource child attributes for.
	 * @param ObjectKey The key value for the resource object type to get the child attributes for.
	 * @param ChildTable The name of the child table to get the records for.
	 * @return An array of maps, one map for each child table record.
	 * @exception Exception
	 */
	public final Map[] getPolicyResourceChildData(String PolicyName, long ObjectKey, String ChildTable) throws Exception {
		return policyUtils.getResourceChildData(getAccessPolicy(PolicyName), ObjectKey, ChildTable);
	}

	/**
	 * Gets an array of maps, one map for each child table record.  Each map contains the attribute-value
	 * pairs for the child table record.
	 *
	 * @param PolicyKey The key value for the access policy to get the resource child attributes for.
	 * @param ObjectKey The key value for the resource object type to get the child attributes for.
	 * @param ChildTable The name of the child table to get the records for.
	 * @return An array of maps, one map for each child table record.
	 * @exception Exception
	 */
	public final Map[] getPolicyResourceChildData(long PolicyKey, long ObjectKey, String ChildTable) throws Exception {
		return policyUtils.getResourceChildData(PolicyKey, ObjectKey, ChildTable);
	}

	/**
	 * Gets the lowest available priority that can be used for a policy.
	 *
	 * @return The lowest available priority that can be used for a policy.
	 * @exception Exception
	 */
	public final int getPolicyLowestAvailablePriority() throws Exception {
		return policyUtils.getLowestAvailablePriority();
	}

	/**
	 * Gets the value for the 'revoke if no longer applies' flag for a given resource object type
	 * for a given access policy.
	 * 
	 * @param PolicyName The name of the access policy to get the flag for.
	 * @param ObjectName The name of the resource object type to get the flag for.
	 * @return <code>true</code> if the object should be revoked when no longer supported by an access
	 *         policy, or <code>false</code> if the object should be left as-is.
	 * @exception Exception
	 */
	public final boolean getRevokeIfNoLongerAppliesFlag(String PolicyName, String ObjectName) throws Exception {
		return policyUtils.getRevokeIfNoLongerAppliesFlag(getAccessPolicy(PolicyName), getResourceObject(ObjectName));
	}

	/**
	 * Gets the value for the 'revoke if no longer applies' flag for a given resource object type
	 * for a given access policy.
	 * 
	 * @param PolicyKey The key value for the access policy to get the flag for.
	 * @param ObjectName The name of the resource object type to get the flag for.
	 * @return <code>true</code> if the object should be revoked when no longer supported by an access
	 *         policy, or <code>false</code> if the object should be left as-is.
	 * @exception Exception
	 */
	public final boolean getRevokeIfNoLongerAppliesFlag(long PolicyKey, String ObjectName) throws Exception {
		return policyUtils.getRevokeIfNoLongerAppliesFlag(PolicyKey, getResourceObject(ObjectName));
	}

	/**
	 * Gets the value for the 'revoke if no longer applies' flag for a given resource object type
	 * for a given access policy.
	 * 
	 * @param PolicyName The name of the access policy to get the flag for.
	 * @param ObjectKey The key value for the resource object type to get the flag for.
	 * @return <code>true</code> if the object should be revoked when no longer supported by an access
	 *         policy, or <code>false</code> if the object should be left as-is.
	 * @exception Exception
	 */
	public final boolean getRevokeIfNoLongerAppliesFlag(String PolicyName, long ObjectKey) throws Exception {
		return policyUtils.getRevokeIfNoLongerAppliesFlag(getAccessPolicy(PolicyName), ObjectKey);
	}

	/**
	 * Gets the value for the 'revoke if no longer applies' flag for a given resource object type
	 * for a given access policy.
	 * 
	 * @param PolicyKey The key value for the access policy to get the flag for.
	 * @param ObjectKey The key value for the resource object type to get the flag for.
	 * @return <code>true</code> if the object should be revoked when no longer supported by an access
	 *         policy, or <code>false</code> if the object should be left as-is.
	 * @exception Exception
	 */
	public final boolean getRevokeIfNoLongerAppliesFlag(long PolicyKey, long ObjectKey) throws Exception {
		return policyUtils.getRevokeIfNoLongerAppliesFlag(PolicyKey, ObjectKey);
	}

	/**
	 * Sets the value for the 'revoke if no longer applies' flag for a given resource object type
	 * for a given access policy.
	 * 
	 * @param PolicyName The name of the access policy to set the flag for.
	 * @param ObjectName The name of the resource object type to set the flag for.
	 * @param RevokeIfNoLongerApplies The value to set for the flag.
	 * @exception Exception
	 */
	public final void setRevokeIfNoLongerAppliesFlag(String PolicyName, String ObjectName, boolean RevokeIfNoLongerApplies) throws Exception {
		policyUtils.setRevokeIfNoLongerAppliesFlag(getAccessPolicy(PolicyName), getResourceObject(ObjectName), RevokeIfNoLongerApplies);
	}

	/**
	 * Sets the value for the 'revoke if no longer applies' flag for a given resource object type
	 * for a given access policy.
	 * 
	 * @param PolicyKey The key value for the access policy to set the flag for.
	 * @param ObjectName The name of the resource object type to set the flag for.
	 * @param RevokeIfNoLongerApplies The value to set for the flag.
	 * @exception Exception
	 */
	public final void setRevokeIfNoLongerAppliesFlag(long PolicyKey, String ObjectName, boolean RevokeIfNoLongerApplies) throws Exception {
		policyUtils.setRevokeIfNoLongerAppliesFlag(PolicyKey, getResourceObject(ObjectName), RevokeIfNoLongerApplies);
	}

	/**
	 * Sets the value for the 'revoke if no longer applies' flag for a given resource object type
	 * for a given access policy.
	 * 
	 * @param PolicyName The name of the access policy to set the flag for.
	 * @param ObjectKey The key value for the resource object type to set the flag for.
	 * @param RevokeIfNoLongerApplies The value to set for the flag.
	 * @exception Exception
	 */
	public final void setRevokeIfNoLongerAppliesFlag(String PolicyName, long ObjectKey, boolean RevokeIfNoLongerApplies) throws Exception {
		policyUtils.setRevokeIfNoLongerAppliesFlag(getAccessPolicy(PolicyName), ObjectKey, RevokeIfNoLongerApplies);
	}

	/**
	 * Sets the value for the 'revoke if no longer applies' flag for a given resource object type
	 * for a given access policy.
	 * 
	 * @param PolicyKey The key value for the access policy to set the flag for.
	 * @param ObjectKey The key value for the resource object type to set the flag for.
	 * @param RevokeIfNoLongerApplies The value to set for the flag.
	 * @exception Exception
	 */
	public final void setRevokeIfNoLongerAppliesFlag(long PolicyKey, long ObjectKey, boolean RevokeIfNoLongerApplies) throws Exception {
		policyUtils.setRevokeIfNoLongerAppliesFlag(PolicyKey, ObjectKey, RevokeIfNoLongerApplies);
	}

	/**
	 * Returns a list of available child tables for the specified object.
	 *
	 * @param ObjectName The name of the resource object type to get the child table list for.
	 * @return An array of available child tables for the specifed resource type.
	 * @exception Exception
	 */
	public final String[] getPolicyResourceChildTables(String ObjectName) throws Exception {
		return policyUtils.getResourceChildTables(getResourceObject(ObjectName));
	}

	/**
	 * Returns a list of available child tables for the specified object.
	 *
	 * @param ObjectKey The key value for the resource object type to get the child table list for.
	 * @return An array of available child tables for the specifed resource type.
	 * @exception Exception
	 */
	public final String[] getPolicyResourceChildTables(long ObjectKey) throws Exception {
		return policyUtils.getResourceChildTables(ObjectKey);
	}

	/**
	 * Indicates if a given form field contains an IT resource key or not.
	 *
	 * @param ObjectName The name of the resource object type on which the field is found.
	 * @param FieldName The name of the form field to test for presence of an IT resource key.
	 * @return <code>true</code> if the field contains an IT resource key, or <code>false</code>
	 *         if the field does not.
	 * @exception Exception
	 */
	public final boolean isPolicyITResourceField(String ObjectName, String FieldName) throws Exception {
		return policyUtils.isITResourceField(getResourceObject(ObjectName), FieldName);
	}

	/**
	 * Indicates if a given form field contains an IT resource key or not.
	 *
	 * @param ObjectKey The key value for the resource object type on which the field is found.
	 * @param FieldName The name of the form field to test for presence of an IT resource key.
	 * @return <code>true</code> if the field contains an IT resource key, or <code>false</code>
	 *         if the field does not.
	 * @exception Exception
	 */
	public final boolean isPolicyITResourceField(long ObjectKey, String FieldName) throws Exception {
		return policyUtils.isITResourceField(ObjectKey, FieldName);
	}

	/**
	 * Resolves a field label to a form column.  This searches the parent form first, then the child forms.
	 * 
	 * @param Label The label of the column to resolve to a form field.
	 * @param ObjectName The name of the resource object type on which the field is found.
	 * @return The name of the column corresponding to the field label, or an empty string if the label is not found.
	 * @exception Exception 
	 */
	public final String resolvePolicyDisplayName(String Label, String ObjectName) throws Exception {
		return policyUtils.resolveDisplayName(Label, getResourceObject(ObjectName));
	}

	/**
	 * Resolves a field label to a form column.  This searches the parent form first, then the child forms.
	 * 
	 * @param Label The label of the column to resolve to a form field.
	 * @param ObjectKey The key value for the resource object type on which the field is found.
	 * @return The name of the column corresponding to the field label, or an empty string if the label is not found.
	 * @exception Exception 
	 */
	public final String resolvePolicyDisplayName(String Label, long ObjectKey) throws Exception {
		return policyUtils.resolveDisplayName(Label, ObjectKey);
	}
	
	/**
	 * Creates a new request in OIM.
	 * 
	 * @param Request The data for the request to create.
	 * @return The key of the resulting request.
	 * @exception Exception
	 */
	public final long createRequest(OIMRequest Request) throws Exception {
		return requestUtils.createRequest(Request);
	}
	
	/**
	 * Creates a new request in OIM.
	 * 
	 * @param Request The data for the request to create.
	 * @param Requester The username of the requester you the prepop adapters should be run as.
	 * @return The key of the resulting request.
	 * @exception Exception
	 */
	public final long createRequest(OIMRequest Request, String Requester) throws Exception {
		return requestUtils.createRequest(Request, getOimUser(Requester));
	}
	
	/**
	 * Creates a new request in OIM.
	 * 
	 * @param Request The data for the request to create.
	 * @param RequesterKey The key of the requester you the prepop adapters should be run as.
	 * @return The key of the resulting request.
	 * @exception Exception
	 */
	public final long createRequest(OIMRequest Request, long RequesterKey) throws Exception {
		return requestUtils.createRequest(Request, RequesterKey);
	}
}